Pass list of params to pytest.main() in docs

This commit is contained in:
Bruno Oliveira 2016-08-01 18:36:49 -04:00
parent 946466abf4
commit a6b2732507
1 changed files with 1 additions and 3 deletions

View File

@ -318,7 +318,7 @@ You can specify additional plugins to ``pytest.main``::
def pytest_sessionfinish(self):
print("*** test run reporting finishing")
pytest.main("-qq", plugins=[MyPlugin()])
pytest.main(["-qq"], plugins=[MyPlugin()])
Running it will show that ``MyPlugin`` was added and its
hook was invoked::
@ -326,7 +326,5 @@ hook was invoked::
$ python myinvoke.py
*** test run reporting finishing
======= pytest-warning summary ========
WC1 None passing a string to pytest.main() is deprecated, pass a list of arguments instead.
.. include:: links.inc