Skip to content

Commit c983aba

Browse files
committed
Removed remaining usages and examples with tox. Updated references to tox to reference to nox instead.
1 parent 4c0bdad commit c983aba

File tree

9 files changed

+26
-33
lines changed

9 files changed

+26
-33
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include LICENSE README.md CHANGELOG.md CONTRIBUTING.md tox.ini noxfile.py Pipfile
1+
include LICENSE README.md CHANGELOG.md CONTRIBUTING.md noxfile.py Pipfile
22
recursive-include examples *
33
recursive-include tests *
44
recursive-include docs *

plugins/ext_test/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import nox
2+
3+
4+
@nox.session(python=['3.5', '3.6', '3.7', '3.8', '3.9'])
5+
def tests(session):
6+
session.install('invoke', './[test]')
7+
session.run('invoke', 'pytest', '--junit', '--no-pty')

plugins/ext_test/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def rmrf(items, verbose=True):
4141

4242
#####
4343
#
44-
# pytest, tox, pylint, and codecov
44+
# pytest, pylint, and codecov
4545
#
4646
#####
4747

plugins/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#####
2424
#
25-
# pytest, tox, pylint, and codecov
25+
# pytest, pylint, and codecov
2626
#
2727
#####
2828

plugins/template/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ python supported by cmd2, and all supported platforms. cmd2 uses a three
208208
tiered testing strategy to accomplish this objective.
209209

210210
- [pytest](https://pytest.org) runs the unit tests
211-
- [tox](https://tox.readthedocs.io/) runs the unit tests on multiple versions
211+
- [nox](https://nox.thea.codes/en/stable/) runs the unit tests on multiple versions
212212
of python
213213
- [AppVeyor](https://www.appveyor.com/) and [TravisCI](https://travis-ci.com)
214214
run the tests on the various supported platforms
@@ -218,7 +218,7 @@ This plugin template is set up to use the same strategy.
218218

219219
### Create python environments
220220

221-
This project uses [tox](https://tox.readthedocs.io/en/latest/) to run the test
221+
This project uses [nox](https://nox.thea.codes/en/stable/) to run the test
222222
suite against multiple python versions. I recommend
223223
[pyenv](https://github.com/pyenv/pyenv) with the
224224
[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
296296
unit tests found in the `tests` directory.
297297

298298

299-
### Use tox to run unit tests in multiple versions of python
299+
### Use nox to run unit tests in multiple versions of python
300300

301-
The included `tox.ini` is setup to run the unit tests in python 3.4, 3.5, 3.6,
301+
The included `noxfile.py` is setup to run the unit tests in python 3.4, 3.5, 3.6,
302302
and 3.7. You can run your unit tests in all of these versions of python by:
303303
```
304-
$ invoke tox
304+
$ nox
305305
```
306306

307307

plugins/template/noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import nox
2+
3+
4+
@nox.session(python=['3.5', '3.6', '3.7', '3.8', '3.9'])
5+
def tests(session):
6+
session.install('invoke', './[test]')
7+
session.run('invoke', 'pytest', '--junit', '--no-pty')

plugins/template/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def rmrf(items, verbose=True):
3636

3737
#####
3838
#
39-
# pytest, tox, pylint, and codecov
39+
# pytest, pylint, and codecov
4040
#
4141
#####
4242

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
":sys_platform=='win32'": ['pyreadline'],
4848
# Extra dependencies for running unit tests
4949
'test': [
50-
"gnureadline; sys_platform=='darwin'", # include gnureadline on macOS to ensure it is available in tox env
50+
"gnureadline; sys_platform=='darwin'", # include gnureadline on macOS to ensure it is available in nox env
5151
"mock ; python_version<'3.6'", # for python 3.5 we need the third party mock module
5252
'codecov',
5353
'coverage',
@@ -57,7 +57,7 @@
5757
],
5858
# development only dependencies: install with 'pip install -e .[dev]'
5959
'dev': ["mock ; python_version<'3.6'", # for python 3.5 we need the third party mock module
60-
'pytest', 'codecov', 'pytest-cov', 'pytest-mock', 'tox', 'nox', 'flake8',
60+
'pytest', 'codecov', 'pytest-cov', 'pytest-mock', 'nox', 'flake8',
6161
'sphinx', 'sphinx-rtd-theme', 'sphinx-autobuild', 'doc8',
6262
'invoke', 'twine>=1.11',
6363
]

tasks.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def rmrf(items, verbose=True):
4646

4747
#####
4848
#
49-
# pytest, tox, nox, pylint, and codecov
49+
# pytest, nox, pylint, and codecov
5050
#
5151
#####
5252

@@ -114,27 +114,6 @@ def mypy_clean(context):
114114
namespace_clean.add_task(mypy_clean, 'mypy')
115115

116116

117-
@invoke.task
118-
def tox(context):
119-
"""Run unit and integration tests on multiple python versions using tox"""
120-
with context.cd(TASK_ROOT_STR):
121-
context.run("tox")
122-
123-
124-
namespace.add_task(tox)
125-
126-
127-
@invoke.task
128-
def tox_clean(context):
129-
"""Remove tox virtualenvs and logs"""
130-
# pylint: disable=unused-argument
131-
with context.cd(TASK_ROOT_STR):
132-
rmrf('.tox')
133-
134-
135-
namespace_clean.add_task(tox_clean, 'tox')
136-
137-
138117
@invoke.task
139118
def nox_clean(context):
140119
"""Remove nox virtualenvs and logs"""

0 commit comments

Comments
 (0)