Browse Source

changed isolated test runner from tox to nox

master
Holger Frey 2 years ago
parent
commit
4ed6296071
  1. 7
      Makefile
  2. 8
      noxfile.py
  3. 14
      pyproject.toml
  4. 14
      tox.ini

7
Makefile

@ -76,8 +76,11 @@ coverall: lint ## full test suite, check code coverage and open coverage report @@ -76,8 +76,11 @@ coverall: lint ## full test suite, check code coverage and open coverage report
coverage html
$(BROWSER) htmlcov/index.html
tox: ## run fully isolated tests with tox
tox
nox: ## run fully isolated tests with nox
nox
tox: ## old habits die hard: typo-squatting to use nox
nox
docs: ## build the documentation using mkdocs
mkdocs build

8
noxfile.py

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
import nox
@nox.session(python=["3.9", "3.10", "3.11"])
def tests(session):
session.install(".[test]")
session.run("pytest", *session.posargs)

14
pyproject.toml

@ -39,13 +39,6 @@ Source = "https://git.cpi.imtek.uni-freiburg.de/holgi/sensospot_parser.git" @@ -39,13 +39,6 @@ Source = "https://git.cpi.imtek.uni-freiburg.de/holgi/sensospot_parser.git"
sensospot_parse = "sensospot_parser:main"
[project.optional-dependencies]
test = [
"pytest >=4.0.0",
"pytest-cov",
"pytest-mock",
"pytest-randomly >=3.5.0",
"tox",
]
dev = [
"black",
"keyring",
@ -56,6 +49,13 @@ docs = [ @@ -56,6 +49,13 @@ docs = [
"mkdocs",
"mkdocstrings[python]",
]
test = [
"pytest >=4.0.0",
"pytest-cov",
"pytest-mock",
"pytest-randomly >=3.5.0",
"nox",
]
[tool.pytest.ini_options]

14
tox.ini

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
[tox]
envlist = py39, py310
isolated_build = True
[testenv]
deps =
pytest
pytest-cov
pytest-mock
setuptools>=41.2.0
pip>=20.0.2
changedir = {toxinidir}/tests
commands = pytest --cov=sensovation_parser
Loading…
Cancel
Save