Overview¶
docs |
|
---|---|
tests |
|
package |
test framework for OpenFOAM
Free software: BSD 2-Clause License
Installation¶
pip install oftest
You can also install the in-development version with:
pip install https://github.com/HenningScheufler/oftest/archive/master.zip
Documentation¶
Development¶
To run all the tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows |
set PYTEST_ADDOPTS=--cov-append
tox
|
---|---|
Other |
PYTEST_ADDOPTS=--cov-append tox
|
Usage¶
add conftest.py and pytest.ini to your project
cat pytest.ini
[pytest]
#minversion = 6.0
addopts = -ra -v --import-mode=importlib --tb=no --cache-clear --writeNSteps 1
testpaths =
tests
cat conftest.py
import pytest
def pytest_addoption(parser):
parser.addoption(
"--writeNSteps", action="store", default=0, help="only perform specified number of timestep"
)
parser.addoption(
"--no-Allclean", action='store_false',default=True ,help="do not clean case after run"
)