Skip to content

Commit a6b2732

Browse files
committed
Pass list of params to pytest.main() in docs
1 parent 946466a commit a6b2732

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

doc/en/usage.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,13 @@ You can specify additional plugins to ``pytest.main``::
318318
def pytest_sessionfinish(self):
319319
print("*** test run reporting finishing")
320320

321-
pytest.main("-qq", plugins=[MyPlugin()])
321+
pytest.main(["-qq"], plugins=[MyPlugin()])
322322

323323
Running it will show that ``MyPlugin`` was added and its
324324
hook was invoked::
325325

326326
$ python myinvoke.py
327327
*** test run reporting finishing
328328
329-
======= pytest-warning summary ========
330-
WC1 None passing a string to pytest.main() is deprecated, pass a list of arguments instead.
331329

332330
.. include:: links.inc

0 commit comments

Comments
 (0)