summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-07-21 16:36:31 -0400
committeranselor <anselor@gmail.com>2020-08-04 13:38:08 -0400
commit372676d479dff8bb07f9361deddd63b17ce7c9d3 (patch)
tree6e10d6de68c693928c045a57f369c65aac6014e5 /tasks.py
parent65136e9222ada9485f1313fc7bb3e189f060b8d5 (diff)
downloadcmd2-git-372676d479dff8bb07f9361deddd63b17ce7c9d3.tar.gz
Moved commandset tests into an isolated test
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index e5f6e7cb..811e3245 100644
--- a/tasks.py
+++ b/tasks.py
@@ -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)