Pass list of params to pytest.main() in docs
This commit is contained in:
parent
946466abf4
commit
a6b2732507
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue