From 226f9d681df92ea2757c3f97386859983474f727 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 23 May 2013 14:59:09 +0200 Subject: Add a plugin for test ordering Tests in test classes decorated by @ipatests.order_plugin.ordered are sorted by the source line number instead of alphabetically, if the plugin is enabled. The ipa-run-tests helper now loads and enables the plugin. This should make writing integration tests easier. --- ipatests/ipa-run-tests | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ipatests/ipa-run-tests') diff --git a/ipatests/ipa-run-tests b/ipatests/ipa-run-tests index e788df30b..fe2cca6f4 100755 --- a/ipatests/ipa-run-tests +++ b/ipatests/ipa-run-tests @@ -34,12 +34,14 @@ import nose import ipatests from ipatests.beakerlib_plugin import BeakerLibPlugin +from ipatests.order_plugin import OrderTests cmd = [ sys.argv[0], '-v', '--with-doctest', '--doctest-tests', + '--with-ordered-tests', '--exclude=plugins', '--where', os.path.dirname(ipatests.__file__), ] @@ -49,4 +51,4 @@ cmd += sys.argv[1:] # This must be set so ipalib.api gets initialized property for tests: os.environ['IPA_UNIT_TEST_MODE'] = 'cli_test' -nose.main(argv=cmd, addplugins=[BeakerLibPlugin()]) +nose.main(argv=cmd, addplugins=[BeakerLibPlugin(), OrderTests()]) -- cgit