diff options
author | Eric Lin <anselor@gmail.com> | 2020-07-21 16:36:31 -0400 |
---|---|---|
committer | anselor <anselor@gmail.com> | 2020-08-04 13:38:08 -0400 |
commit | 372676d479dff8bb07f9361deddd63b17ce7c9d3 (patch) | |
tree | 6e10d6de68c693928c045a57f369c65aac6014e5 /tasks.py | |
parent | 65136e9222ada9485f1313fc7bb3e189f060b8d5 (diff) | |
download | cmd2-git-372676d479dff8bb07f9361deddd63b17ce7c9d3.tar.gz |
Moved commandset tests into an isolated test
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -58,8 +58,15 @@ def pytest(context, junit=False, pty=True): command_str = 'pytest --cov=cmd2 --cov-report=term --cov-report=html ' if junit: command_str += ' --junitxml=junit/test-results.xml ' - command_str += ' tests' - context.run(command_str, pty=pty) + tests_cmd = command_str + ' tests' + context.run(tests_cmd, pty=pty) + + command_str += ' --cov-append' + + for root, dirnames, _ in os.walk(TASK_ROOT/'isolated_tests'): + for dir in dirnames: + if dir.startswith('test_'): + context.run(command_str + ' isolated_tests/' + dir) namespace.add_task(pytest) |