Tweak test_communicate_stderr so that it works when run under a pydebug build.

This commit is contained in:
Brett Cannon 2005-03-05 06:40:52 +00:00
parent 07eca3a99b
commit 653a5adcca
1 changed files with 3 additions and 1 deletions

View File

@ -269,7 +269,9 @@ class ProcessTestCase(unittest.TestCase):
stderr=subprocess.PIPE)
(stdout, stderr) = p.communicate()
self.assertEqual(stdout, None)
self.assertEqual(stderr, "pineapple")
# When running with a pydebug build, the # of references is outputted
# to stderr, so just check if stderr at least started with "pinapple"
self.assert_(stderr.startswith("pineapple"))
def test_communicate(self):
p = subprocess.Popen([sys.executable, "-c",