Skip to content

Commit

Permalink
runtests.py: allow to specify a custom test to run
Browse files Browse the repository at this point in the history
  • Loading branch information
vdboor committed Jun 10, 2015
1 parent cbf5141 commit c8be406
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion runtests.py
Expand Up @@ -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__':
Expand Down

0 comments on commit c8be406

Please sign in to comment.