From ed633aa5cca0be36bb5584fd519143ee46d33366 Mon Sep 17 00:00:00 2001 From: Aniket Maurya Date: Thu, 11 Apr 2024 20:59:22 -0400 Subject: [PATCH] kill process after use (#38) --- tests/test_lit_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_lit_server.py b/tests/test_lit_server.py index 22d28378..48c3e36f 100644 --- a/tests/test_lit_server.py +++ b/tests/test_lit_server.py @@ -106,7 +106,7 @@ def test_single_loop(simple_litapi, loop_args): def test_run(): - subprocess.Popen( + process = subprocess.Popen( ["python", "tests/simple_server.py"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, @@ -118,3 +118,4 @@ def test_run(): output = subprocess.run("python client.py", shell=True, capture_output=True, text=True).stdout assert '{"output":16.0}' in output os.remove("client.py") + process.kill()