Skip to content

Commit

Permalink
Merge pull request #2378 from szuliq/patch-1
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
nicoddemus authored Apr 26, 2017
2 parents 314d4af + f053319 commit d7d2249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/en/fixture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d7d2249

Please sign in to comment.