Passing python_files
option to pytest.Config
#10052
-
I support a Python-based HDL testing framework cocotb where we use pytest's assertion rewriting like so. # Install the assertion rewriting hook, which must be done before we
# import the test modules.
from _pytest.assertion import install_importhook
from _pytest.config import Config
pytest_conf = Config.fromdictargs({}, ["--capture=no"])
install_importhook(pytest_conf) However, this only applies assertion rewriting to modules that match # What I tried
Config.fromdictargs({"python_files": "*.py"}, ["--capture=no"]) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @ktbarrett sorry for the delay. Any config option can be passed via command-line using See the starting paragraph of Configuration Options. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hi @ktbarrett sorry for the delay.
Any config option can be passed via command-line using
-o
, for examplepytest -o python_files=*.py
.See the starting paragraph of Configuration Options.
Hope that helps!