Merged revisions 86107 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86107 | brian.curtin | 2010-11-01 22:59:09 -0500 (Mon, 01 Nov 2010) | 2 lines

  Clean up ResourceWarnings. Explictly close stdout from the subprocess.
........
This commit is contained in:
Brian Curtin 2010-11-02 04:04:37 +00:00
parent 62c20b61cd
commit a54bf8b006
1 changed files with 1 additions and 0 deletions

View File

@ -428,6 +428,7 @@ class ThreadJoinOnShutdown(BaseTestCase):
p = subprocess.Popen([sys.executable, "-c", script], stdout=subprocess.PIPE)
rc = p.wait()
data = p.stdout.read().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")