mirror of
https://github.com/SELinuxProject/setools
synced 2025-01-30 11:41:38 +00:00
Change test runner to pytest.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
This commit is contained in:
parent
a75656b891
commit
85cac110be
@ -32,6 +32,7 @@ addition to the development packages from the above list:
|
||||
|
||||
To run SETools unit tests, the following packages are required, in
|
||||
addition to the above dependencies:
|
||||
* pytest
|
||||
* tox (optional)
|
||||
|
||||
### Obtaining SETools
|
||||
@ -130,9 +131,11 @@ for up-to-date information on build and install options, respectively.
|
||||
|
||||
One goal for SETools is to provide confidence in the validity of the
|
||||
output for the tools. The unit tests for SETools can be run with
|
||||
the following command
|
||||
the following commands:
|
||||
|
||||
```
|
||||
$ python setup.py test
|
||||
$ python setup.py build_ext -i
|
||||
$ pytest tests
|
||||
```
|
||||
|
||||
## Features
|
||||
|
@ -1,3 +1,7 @@
|
||||
[build-system]
|
||||
requires = ["setuptools", "Cython>=0.27"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = ["--import-mode=importlib",]
|
||||
pythonpath = "."
|
||||
|
5
tox.ini
5
tox.ini
@ -18,7 +18,7 @@ deps = {[testenv]deps}
|
||||
commands_pre = coverage --version
|
||||
coverage erase
|
||||
{envpython} setup.py build_ext -i
|
||||
commands = coverage run setup.py test -q
|
||||
commands = coverage run -m pytest tests
|
||||
coverage report
|
||||
|
||||
[testenv:lint]
|
||||
@ -48,9 +48,10 @@ commands = mypy -p setools
|
||||
passenv = USERSPACE_SRC
|
||||
deps = networkx>=2.0
|
||||
cython>=0.27
|
||||
pytest
|
||||
py36: dataclasses
|
||||
py38: cython>=0.29.14
|
||||
py39: networkx>=2.6
|
||||
py39: cython>=0.29.14
|
||||
commands_pre = {envpython} setup.py build_ext -i
|
||||
commands = {envpython} setup.py test -q
|
||||
commands = pytest tests
|
||||
|
Loading…
Reference in New Issue
Block a user