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 <[email protected]>, 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 <[email protected]> http://NxNW.org/~steve/
signature.asc
Description: Digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
