我正在尝试为一个项目编写新的测试,而我只想在tox中测试该测试。我已经完全确定其他测试也可以,我不需要每次都运行它们。我发现的唯一建议不适用于
ERROR: InvocationError: could not find executable
$ tox -e py35 -- project/tests/test_file.py::TestClassName::test_method
但是beluga.me在评论中提到了细颗粒:如果您有一个tox.ini
文件,可能需要在{posargs}
tox.ini中将pytest添加到pytest中:
[tox]
envlist = py35
[testenv]
deps =
pytest
pytest-cov
pytest-pep8
commands =
pip install -e .
pytest {posargs}
python3 -m unittest -q test_file.TestClassName
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句