summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradehad <26027314+adehad@users.noreply.github.com>2021-10-21 21:56:13 +0100
committeradehad <26027314+adehad@users.noreply.github.com>2021-10-21 21:56:13 +0100
commita20ffffaae25cd12b3513a930df2951cac452e4d (patch)
treea0bd7f3d5b04b9fbd3ec14f8dd67b0be9445c6c1
parenta8f8635f002fef32f35852a9dc2ede1b9732d731 (diff)
downloadtftpy-a20ffffaae25cd12b3513a930df2951cac452e4d.tar.gz
add pytest config
-rw-r--r--.gitignore1
-rw-r--r--pyproject.toml8
-rw-r--r--tox.ini4
3 files changed, 12 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 1e88470..daf7051 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@ test.log
tftpy.egg-info
# PyCharm
.idea/
+coverage.xml
diff --git a/pyproject.toml b/pyproject.toml
index 5f247e2..e24fdde 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,11 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools_scm[toml]"]
build-backend = "setuptools.build_meta"
+
+[tool.pytest.ini_options]
+minversion = "6.0"
+addopts = "-v -rxX --tb=long --color=yes --junitxml=build/results.xml --cov-report=xml --cov"
+testpaths = [
+ "t/",
+ "t/test.py",
+]
diff --git a/tox.ini b/tox.ini
index 6301a14..de90c0a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,6 +13,7 @@ skipdist = True
usedevelop = True
deps =
pytest
+ pytest-cov
setenv =
PYTHONIOENCODING=UTF-8
PIP_DISABLE_PIP_VERSION_CHECK=1
@@ -21,7 +22,8 @@ passenv =
whitelist_externals =
git
commands=
- python -m pytest t/test.py {posargs}
+ # pyproject.toml for config and defaults
+ python -m pytest {posargs}
[testenv:pkg]
deps =