From cef85a498686d221453b50fdf59cfe6efc1a296b Mon Sep 17 00:00:00 2001 From: Jair Henrique Date: Mon, 31 Oct 2022 22:36:33 -0300 Subject: [PATCH] remove pytest deprecation warning for yield_fixture --- tests/integration/test_proxy.py | 2 +- tests/integration/test_wild.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_proxy.py b/tests/integration/test_proxy.py index 9f6241e..6eb6223 100644 --- a/tests/integration/test_proxy.py +++ b/tests/integration/test_proxy.py @@ -37,7 +37,7 @@ class Proxy(http.server.SimpleHTTPRequestHandler): self.copyfile(upstream_response, self.wfile) -@pytest.yield_fixture(scope="session") +@pytest.fixture(scope="session") def proxy_server(): httpd = socketserver.ThreadingTCPServer(("", 0), Proxy) proxy_process = multiprocessing.Process(target=httpd.serve_forever) diff --git a/tests/integration/test_wild.py b/tests/integration/test_wild.py index c04b307..ddd6fa2 100644 --- a/tests/integration/test_wild.py +++ b/tests/integration/test_wild.py @@ -84,7 +84,7 @@ def start_rpc_server(q): httpd.serve_forever() -@pytest.yield_fixture(scope="session") +@pytest.fixture(scope="session") def rpc_server(): q = multiprocessing.Queue() proxy_process = multiprocessing.Process(target=start_rpc_server, args=(q,))