diff options
author | Eric Lin <anselor@gmail.com> | 2020-08-04 14:08:37 -0400 |
---|---|---|
committer | anselor <anselor@gmail.com> | 2020-08-04 15:23:44 -0400 |
commit | c983abaa881a3ac6110a90194def660489b2d5cc (patch) | |
tree | 62afd538178f18a8f66727fa5e4af60e074a8485 /plugins | |
parent | 4c0bdad9acd578536436246023ae884755089040 (diff) | |
download | cmd2-git-c983abaa881a3ac6110a90194def660489b2d5cc.tar.gz |
Removed remaining usages and examples with tox. Updated references to tox to reference to nox instead.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ext_test/noxfile.py | 7 | ||||
-rw-r--r-- | plugins/ext_test/tasks.py | 2 | ||||
-rw-r--r-- | plugins/tasks.py | 2 | ||||
-rw-r--r-- | plugins/template/README.md | 10 | ||||
-rw-r--r-- | plugins/template/noxfile.py | 7 | ||||
-rw-r--r-- | plugins/template/tasks.py | 2 |
6 files changed, 22 insertions, 8 deletions
diff --git a/plugins/ext_test/noxfile.py b/plugins/ext_test/noxfile.py new file mode 100644 index 00000000..85411106 --- /dev/null +++ b/plugins/ext_test/noxfile.py @@ -0,0 +1,7 @@ +import nox + + +@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') diff --git a/plugins/ext_test/tasks.py b/plugins/ext_test/tasks.py index ffa55e61..f23faa69 100644 --- a/plugins/ext_test/tasks.py +++ b/plugins/ext_test/tasks.py @@ -41,7 +41,7 @@ namespace.add_collection(namespace_clean, 'clean') ##### # -# pytest, tox, pylint, and codecov +# pytest, pylint, and codecov # ##### diff --git a/plugins/tasks.py b/plugins/tasks.py index 26ec1adb..1a70e4f2 100644 --- a/plugins/tasks.py +++ b/plugins/tasks.py @@ -22,7 +22,7 @@ namespace.add_collection(namespace_clean, 'clean') ##### # -# pytest, tox, pylint, and codecov +# pytest, pylint, and codecov # ##### diff --git a/plugins/template/README.md b/plugins/template/README.md index 327a226e..8a423f06 100644 --- a/plugins/template/README.md +++ b/plugins/template/README.md @@ -208,7 +208,7 @@ python supported by cmd2, and all supported platforms. cmd2 uses a three tiered testing strategy to accomplish this objective. - [pytest](https://pytest.org) runs the unit tests -- [tox](https://tox.readthedocs.io/) runs the unit tests on multiple versions +- [nox](https://nox.thea.codes/en/stable/) runs the unit tests on multiple versions of python - [AppVeyor](https://www.appveyor.com/) and [TravisCI](https://travis-ci.com) run the tests on the various supported platforms @@ -218,7 +218,7 @@ This plugin template is set up to use the same strategy. ### Create python environments -This project uses [tox](https://tox.readthedocs.io/en/latest/) to run the test +This project uses [nox](https://nox.thea.codes/en/stable/) to run the test suite against multiple python versions. I recommend [pyenv](https://github.com/pyenv/pyenv) with the [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv>) plugin to manage @@ -296,12 +296,12 @@ Run `invoke pytest` from the top level directory of your plugin to run all the unit tests found in the `tests` directory. -### Use tox to run unit tests in multiple versions of python +### Use nox to run unit tests in multiple versions of python -The included `tox.ini` is setup to run the unit tests in python 3.4, 3.5, 3.6, +The included `noxfile.py` is setup to run the unit tests in python 3.4, 3.5, 3.6, and 3.7. You can run your unit tests in all of these versions of python by: ``` -$ invoke tox +$ nox ``` diff --git a/plugins/template/noxfile.py b/plugins/template/noxfile.py new file mode 100644 index 00000000..85411106 --- /dev/null +++ b/plugins/template/noxfile.py @@ -0,0 +1,7 @@ +import nox + + +@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') diff --git a/plugins/template/tasks.py b/plugins/template/tasks.py index dcde1804..6abec40d 100644 --- a/plugins/template/tasks.py +++ b/plugins/template/tasks.py @@ -36,7 +36,7 @@ namespace.add_collection(namespace_clean, 'clean') ##### # -# pytest, tox, pylint, and codecov +# pytest, pylint, and codecov # ##### |