summaryrefslogtreecommitdiff
path: root/noxfile.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-07-13 15:28:40 -0400
committeranselor <anselor@gmail.com>2020-07-14 19:26:30 -0400
commite38684d219847f636562ab2720b82aae4a6fd408 (patch)
treeec20d7a46b8cba1a662d46e79d5e004590bee93b /noxfile.py
parent683d049299c0cf7a2821b639a95ad0911bab1bc7 (diff)
downloadcmd2-git-e38684d219847f636562ab2720b82aae4a6fd408.tar.gz
Brought in cmd2 plugin template as a first-class member of cmd2 proper
Diffstat (limited to 'noxfile.py')
-rw-r--r--noxfile.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/noxfile.py b/noxfile.py
index 217dd8f8..1821c127 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -12,15 +12,16 @@ def docs(session):
@nox.session(python=['3.5', '3.6', '3.7', '3.8', '3.9'])
-def tests(session):
- session.install('invoke', './[test]')
- session.run('invoke', 'pytest', '--junit', '--no-pty')
+@nox.parametrize('plugin', [None, 'ext_test', 'template'])
+def tests(session, plugin):
+ if plugin is None:
+ session.install('invoke', './[test]')
+ session.run('invoke', 'pytest', '--junit', '--no-pty')
+ else:
+ session.install('invoke', '.')
- # cd into test directory to run other unit test
- session.chdir('./plugins/ext_test')
- session.install('.[test]')
- session.run('invoke', 'pytest', '--junit', '--no-pty', '--append-cov')
+ # cd into test directory to run other unit test
+ session.install('plugins/{}[test]'.format(plugin))
+ session.run('invoke', 'plugin.{}.pytest'.format(plugin.replace('_', '-')), '--junit', '--no-pty')
- # return to top directory to submit coverage
- session.chdir('../..')
session.run('codecov')