Skip to content

Commit 862d4af

Browse files
Nati Dziubovcsernazs
authored andcommitted
httpserver: Cleanup state in function scoped fixtures before the test
1 parent 0eb610b commit 862d4af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pytest_httpserver/pytest_plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def pytest_sessionfinish(session, exitstatus): # noqa: ARG001
6464
@pytest.fixture()
6565
def httpserver(make_httpserver):
6666
server = make_httpserver
67-
yield server
6867
server.clear()
68+
return server
6969

7070

7171
@pytest.fixture(scope="session")
@@ -81,8 +81,8 @@ def make_httpserver_ipv4(httpserver_ssl_context):
8181
@pytest.fixture()
8282
def httpserver_ipv4(make_httpserver_ipv4):
8383
server = make_httpserver_ipv4
84-
yield server
8584
server.clear()
85+
return server
8686

8787

8888
@pytest.fixture(scope="session")
@@ -98,5 +98,5 @@ def make_httpserver_ipv6(httpserver_ssl_context):
9898
@pytest.fixture()
9999
def httpserver_ipv6(make_httpserver_ipv6):
100100
server = make_httpserver_ipv6
101-
yield server
102101
server.clear()
102+
return server

0 commit comments

Comments
 (0)