Skip to content

Commit b8698ee

Browse files
emmett-rayescsernazs
authored andcommitted
Update examples
1 parent a193819 commit b8698ee

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

doc/howto.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ the ``httpserver`` fixture).
312312
313313
import pytest
314314
315-
@pytest.fixture
315+
@pytest.fixture(scope="session")
316316
def httpserver_listen_address():
317317
return ("127.0.0.1", 8000)
318318
@@ -395,7 +395,7 @@ starting/stopping the server is costly.
395395
import requests
396396
397397
# setting a fixed port for httpserver
398-
@pytest.fixture
398+
@pytest.fixture(scope="session")
399399
def httpserver_listen_address():
400400
return ("127.0.0.1", 8000)
401401

example_pytest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# specify where the server should bind to
88
# you can return 0 as the port, in this case it will bind to a free (ephemeral) TCP port
9-
@pytest.fixture
9+
@pytest.fixture(scope="session")
1010
def httpserver_listen_address():
1111
return ("127.0.0.1", 8000)
1212

0 commit comments

Comments
 (0)