From a9b44c45298ca3d5560f9c9245914fd601a2fc14 Mon Sep 17 00:00:00 2001 From: Krzysztof Szularz Date: Tue, 25 Apr 2017 16:35:19 +0200 Subject: [PATCH 1/2] Update docs Remove not needed `request` arg in order to simplify the example. --- doc/en/fixture.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index 01706479d..51c5d6af3 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -287,7 +287,7 @@ Note that we can also seamlessly use the ``yield`` syntax with ``with`` statemen import pytest @pytest.fixture(scope="module") - def smtp(request): + def smtp(): with smtplib.SMTP("smtp.gmail.com") as smtp: yield smtp # provide the fixture value From f0533194ed99648bec45e5ae0120a3f6bf6c2eb1 Mon Sep 17 00:00:00 2001 From: Krzysztof Szularz Date: Wed, 26 Apr 2017 10:31:53 +0200 Subject: [PATCH 2/2] Update fixture.rst Remove yet another not needed `request` argument in fixture definition. --- doc/en/fixture.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index 51c5d6af3..9641d6aac 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -253,7 +253,7 @@ the code after the *yield* statement serves as the teardown code: import pytest @pytest.fixture(scope="module") - def smtp(request): + def smtp(): smtp = smtplib.SMTP("smtp.gmail.com") yield smtp # provide the fixture value print("teardown smtp")