2016-08-18 39 views

回答

2

如果你定义一个参数{posargs}tox.ini您可以在参数在执行过程中通过。在py.test的情况下,如果

py.test -k test_simple_backup_generation 

只会测试一个功能:

[tox] 
envlist = py27,py35 
[testenv] 
deps=pytest 
commands= 
    pip install -e .[tests,docs] 
    py.test {posargs} 

和运行像

tox -- -k test_simple_backup_generation 
+0

感谢您的回答。我有一个关于tox/py.test的更多问题[here](http://stackoverflow.com/questions/39018056/how-do-the-arguments-are-being-passed-to-test-functions-in-tox -py检验)。你能检查一下吗? –

相关问题