From c8be406342ba89921253ec1f085a0a847ed0650b Mon Sep 17 00:00:00 2001 From: Diederik van der Boor Date: Wed, 10 Jun 2015 12:27:58 +0200 Subject: [PATCH] runtests.py: allow to specify a custom test to run --- runtests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/runtests.py b/runtests.py index 801b0637..4101f29e 100755 --- a/runtests.py +++ b/runtests.py @@ -54,8 +54,15 @@ FLUENT_PAGES_TEMPLATE_DIR = path.join(module_root, 'fluent_pages', 'tests', 'testapp', 'templates'), ) +DEFAULT_TEST_APPS = [ + 'fluent_pages', +] + + def runtests(): - argv = sys.argv[:1] + ['test', 'fluent_pages', '--traceback'] + sys.argv[1:] + other_args = list(filter(lambda arg: arg.startswith('-'), sys.argv[1:])) + test_apps = list(filter(lambda arg: not arg.startswith('-'), sys.argv[1:])) or DEFAULT_TEST_APPS + argv = sys.argv[:1] + ['test', '--traceback'] + other_args + test_apps execute_from_command_line(argv) if __name__ == '__main__':