Skip to content

Commit

Permalink
httpserver: Cleanup state in function scoped fixtures before the test
Browse files Browse the repository at this point in the history
  • Loading branch information
netaneld122 authored and csernazs committed Aug 11, 2024
1 parent 0eb610b commit 862d4af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytest_httpserver/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def pytest_sessionfinish(session, exitstatus): # noqa: ARG001
@pytest.fixture()
def httpserver(make_httpserver):
server = make_httpserver
yield server
server.clear()
return server


@pytest.fixture(scope="session")
Expand All @@ -81,8 +81,8 @@ def make_httpserver_ipv4(httpserver_ssl_context):
@pytest.fixture()
def httpserver_ipv4(make_httpserver_ipv4):
server = make_httpserver_ipv4
yield server
server.clear()
return server


@pytest.fixture(scope="session")
Expand All @@ -98,5 +98,5 @@ def make_httpserver_ipv6(httpserver_ssl_context):
@pytest.fixture()
def httpserver_ipv6(make_httpserver_ipv6):
server = make_httpserver_ipv6
yield server
server.clear()
return server

0 comments on commit 862d4af

Please sign in to comment.