mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-10 17:45:35 +00:00
remove pytest deprecation warning for yield_fixture
This commit is contained in:
@@ -37,7 +37,7 @@ class Proxy(http.server.SimpleHTTPRequestHandler):
|
|||||||
self.copyfile(upstream_response, self.wfile)
|
self.copyfile(upstream_response, self.wfile)
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def proxy_server():
|
def proxy_server():
|
||||||
httpd = socketserver.ThreadingTCPServer(("", 0), Proxy)
|
httpd = socketserver.ThreadingTCPServer(("", 0), Proxy)
|
||||||
proxy_process = multiprocessing.Process(target=httpd.serve_forever)
|
proxy_process = multiprocessing.Process(target=httpd.serve_forever)
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ def start_rpc_server(q):
|
|||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def rpc_server():
|
def rpc_server():
|
||||||
q = multiprocessing.Queue()
|
q = multiprocessing.Queue()
|
||||||
proxy_process = multiprocessing.Process(target=start_rpc_server, args=(q,))
|
proxy_process = multiprocessing.Process(target=start_rpc_server, args=(q,))
|
||||||
|
|||||||
Reference in New Issue
Block a user