Skip to content

Commit 1addd9d

Browse files
hroncokfrenzymadness
authored andcommitted
Move pytest options from tox.ini to pyproject.toml
This way, if we execute %pytest instead of %tox in the Fedora/ELN package, the options are respected. pytest version 6.0 added support for pyproject.toml config, so require pytest>=6. https://docs.pytest.org/en/7.1.x/reference/customize.html#pyproject-toml
1 parent 96c622a commit 1addd9d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
requires = ["setuptools>=40.8.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

5+
[tool.pytest.ini_options]
6+
addopts = "-v"
7+
testpaths = [
8+
"test.py",
9+
]
10+
511
[tool.black]
612
line-length = 79
713
target-version = ['py36', 'py37', 'py38']

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ isolated_build = True
55
[testenv]
66
commands =
77
python -m platform
8-
pytest -v {posargs} test.py
8+
pytest {posargs}
99
deps =
10-
pytest
10+
pytest>=6
1111

1212
[testenv:black]
1313
deps=black

0 commit comments

Comments
 (0)