Skip to content

Commit

Permalink
replace 'tox' with 'nox'
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Sep 16, 2020
1 parent 66054b5 commit 5363f79
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 46 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test:
poetry run nosetests

tox:
poetry run tox
test_matrix:
poetry run nox
28 changes: 28 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import nox
import tempfile
from pathlib import Path
import os
from distutils.dir_util import copy_tree

python_versions = [
"3.8",
]

sphinx_versions = [
"^2.3",
"^3.0",
]

@nox.session(python=python_versions)
@nox.parametrize("sphinx", sphinx_versions)
def tests(session, sphinx):
# see https://github.com/python-poetry/poetry/issues/2920#issuecomment-693147409
with tempfile.TemporaryDirectory() as tmp_dir:
copy_tree(
Path.cwd(), tmp_dir
)
os.chdir(tmp_dir)

session.run('poetry', 'add', f'sphinx@{sphinx}', external=True)
session.run('poetry', 'install', external=True)
session.run('nosetests')
94 changes: 62 additions & 32 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ pytest = "^6.0.2"
pytest-flake8 = "^1.0.6"
coverage = "^5.3"
python-coveralls = "^2.9.3"
tox = "^3.20.0"
nose = "^1.3.7"
sphinx_testing = "^1.0.1"
sphinxcontrib-plantuml = "^0.18.1"
sphinx-copybutton = "^0.3.0"
nox = "^2020.8.22"

[build-system]
requires = ["poetry>=0.12"]
Expand Down
11 changes: 0 additions & 11 deletions tox.ini

This file was deleted.

0 comments on commit 5363f79

Please sign in to comment.