From b6634194af8f59dd7fa032da694776c761dce61b Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 23 Jan 2019 12:44:08 +0000 Subject: [PATCH] issue #477: clean up globals after unix_test. --- tests/unix_test.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unix_test.py b/tests/unix_test.py index 50668f3a..02dc11a4 100644 --- a/tests/unix_test.py +++ b/tests/unix_test.py @@ -132,7 +132,13 @@ class ClientTest(testlib.TestCase): proc = subprocess.Popen( [sys.executable, __file__, 'ClientTest_server', path] ) - self._test_simple_client(path) + try: + self._test_simple_client(path) + finally: + # TODO :) + mitogen.context_id = 0 + mitogen.parent_id = None + mitogen.parent_ids = [] proc.wait()