On Thu, Apr 02, 2015 at 11:19:29PM +0200, Christian Boltz wrote: > Hello, > > this patch ensures nosetests sees all tests in the tests[] tuples. This > requires some name changes because nosetests thinks all function names > containing "test" are tests. (A "not a test" docorator would be an > alternative, but that would require some try/except magic to avoid a > dependency on nose.) > > To avoid nosetests thinks the functions are a test, > - rename setup_all_tests() to setup_all_loops() > - rename regex_test() to _regex_test() (in test-regex_matches.py) > > Also add the module_name as parameter to setup_all_loops and always run > it (not only if __name__ == '__main__'). > > Known issue: nosetests errors out with > ValueError: no such test method in <class ...>: stub_test > when trying to run a single test generated out of tests[]. > (debugging hint: stub_test is the name used in setup_test_loop().) > But that's still an improvement over not seeing those tests at all ;-) > > Again, I propose this patch for trunk and 2.9. > > [ 31-enable-testloops-for-nosetests.diff ]
I'm not crazy about needing to be extra careful about our test method names, but I can see why you went with this approach. Acked-by: Steve Beattie <[email protected]> for trunk and 2.9. 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
