]> granicus.if.org Git - python/commitdiff
Issue #9116: Allowed test to pass on Windows by adjusting the test condition slightly...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 6 May 2012 10:34:50 +0000 (11:34 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 6 May 2012 10:34:50 +0000 (11:34 +0100)
Lib/test/test_capi.py

index 07ec623210e8f18c4c2a81aa0a9047bdbef2d6de..a58c57714d62ffbf6bdd0cfcab94daf6a1000f80 100644 (file)
@@ -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)