Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpserver: Clear state in function-scoped fixtures before the test #352

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading