[apparmor] [patch] AATest: don't limit diff length
Steve Beattie
steve at nxnw.org
Tue Apr 28 20:31:28 UTC 2015
On Mon, Apr 27, 2015 at 10:29:44PM +0200, Christian Boltz wrote:
> Hello,
>
> Am Dienstag, 14. April 2015 schrieb Christian Boltz:
> ...
> > So basically super() is (more or less) useless with py2 :-( - and in
> > case it isn't, it has an annoying syntax.
>
> Since nobody objected to the proposal in my previous mail, here's the
> updated patch that avoids the super() dance:
>
>
> AATest: don't limit diff length
>
> Add setUp() to AATest that sets "self.maxDiff = None" (unlimited).
> This gives us unlimited array diffs everywhere where AATest is used.
>
> Also rename several setUp() functions in test-regex_matches.py to
> AASetup() to avoid that the shiny new AATest setUp() gets overwritten.
As you might suspect, I'm not crazy about this, mostly because
potential contributors who are used to writing python unittest code
will likely be expecting to create setUp() (and tearDown()) and not our
custom AASetup() method. And while overriding setUp() currently would
just drop the maxdiff setting (so no big loss), if we do more complex
and/or essential stuff in AATest:setUp(), it could become a problem.
That said, in the desire to move things along,
Acked-by: Steve Beattie <steve at nxnw.org>, with the proviso that you
add some AASetup() stubs in test-example.py, so that people looking
at it as an example will have clues available (the stub methods don't
need to do more than 'pass' with a suitable comment).
Thanks.
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150428/18781952/attachment.pgp>
More information about the AppArmor
mailing list