From: Vinay Sajip Date: Sun, 6 May 2012 10:34:50 +0000 (+0100) Subject: Issue #9116: Allowed test to pass on Windows by adjusting the test condition slightly... X-Git-Tag: v3.3.0a4~260 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73954040f6b9459e59803fd62af14c547a7b3636;p=thirdparty%2FPython%2Fcpython.git Issue #9116: Allowed test to pass on Windows by adjusting the test condition slightly to allow for a Windows-specific error message. --- diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 07ec623210e8..a58c57714d62 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -48,9 +48,9 @@ class CAPITest(unittest.TestCase): (out, err) = p.communicate() self.assertEqual(out, b'') # This used to cause an infinite loop. - self.assertEqual(err.rstrip(), + self.assertTrue(err.rstrip().startswith( b'Fatal Python error:' - b' PyThreadState_Get: no current thread') + b' PyThreadState_Get: no current thread')) def test_memoryview_from_NULL_pointer(self): self.assertRaises(ValueError, _testcapi.make_memoryview_from_NULL_pointer)