From a6b2732507a10a133cf5dba04aca72b42974e9c7 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 1 Aug 2016 18:36:49 -0400 Subject: [PATCH] Pass list of params to pytest.main() in docs --- doc/en/usage.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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