Commit b68928be authored by Brian Curtin's avatar Brian Curtin

Clean up ResourceWarnings. Explictly close stdout from the subprocess.

parent 21ebbb7d
No related merge requests found
......@@ -445,6 +445,7 @@ class ThreadJoinOnShutdown(BaseTestCase):
p = subprocess.Popen([sys.executable, "-c", script], stdout=subprocess.PIPE)
rc = p.wait()
data = p.stdout.read().decode().replace('\r', '')
p.stdout.close()
self.assertEqual(data, "end of main\nend of thread\n")
self.assertFalse(rc == 2, "interpreter was blocked")
self.assertTrue(rc == 0, "Unexpected error")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment