summaryrefslogtreecommitdiff
path: root/noxfile.py
diff options
context:
space:
mode:
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')