diff options
author | Eric Lin <anselor@gmail.com> | 2020-07-13 15:28:40 -0400 |
---|---|---|
committer | anselor <anselor@gmail.com> | 2020-07-14 19:26:30 -0400 |
commit | e38684d219847f636562ab2720b82aae4a6fd408 (patch) | |
tree | ec20d7a46b8cba1a662d46e79d5e004590bee93b /noxfile.py | |
parent | 683d049299c0cf7a2821b639a95ad0911bab1bc7 (diff) | |
download | cmd2-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.py | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -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') |