Improve runtests.py to run specific tests

fix_request_path_info
Diederik van der Boor 2015-12-28 16:19:52 +01:00
parent 07242d210f
commit c2b7e75125
1 changed files with 7 additions and 1 deletions

View File

@ -50,9 +50,15 @@ if not settings.configured:
SITE_ID = 3,
)
DEFAULT_TEST_APPS = [
'polymorphic',
]
def runtests():
argv = sys.argv[:1] + ['test', 'polymorphic', '--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__':