diff --git a/doc/en/usage.rst b/doc/en/usage.rst index 0ca0a380e..d056abd01 100644 --- a/doc/en/usage.rst +++ b/doc/en/usage.rst @@ -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