diff options
author | adehad <26027314+adehad@users.noreply.github.com> | 2021-10-21 21:56:13 +0100 |
---|---|---|
committer | adehad <26027314+adehad@users.noreply.github.com> | 2021-10-21 21:56:13 +0100 |
commit | a20ffffaae25cd12b3513a930df2951cac452e4d (patch) | |
tree | a0bd7f3d5b04b9fbd3ec14f8dd67b0be9445c6c1 | |
parent | a8f8635f002fef32f35852a9dc2ede1b9732d731 (diff) | |
download | tftpy-a20ffffaae25cd12b3513a930df2951cac452e4d.tar.gz |
add pytest config
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | pyproject.toml | 8 | ||||
-rw-r--r-- | tox.ini | 4 |
3 files changed, 12 insertions, 1 deletions
@@ -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", +] @@ -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 = |