]> granicus.if.org Git - python/commitdiff
Fix test_capi for Windows: strip newline characters
authorVictor Stinner <victor.stinner@haypocalc.com>
Sat, 15 May 2010 01:40:41 +0000 (01:40 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sat, 15 May 2010 01:40:41 +0000 (01:40 +0000)
Fix test_no_FatalError_infinite_loop() introduced by r81142 (issue #3605).

Lib/test/test_capi.py

index 7a6870dc6af6026286626925be8c922fb9668d9f..246e25bbc7b399581f692c48d5abe51c7b4ba8ec 100644 (file)
@@ -45,9 +45,9 @@ class CAPITest(unittest.TestCase):
         (out, err) = p.communicate()
         self.assertEqual(out, b'')
         # This used to cause an infinite loop.
-        self.assertEqual(err,
+        self.assertEqual(err.rstrip(),
                          b'Fatal Python error:'
-                         b' PyThreadState_Get: no current thread\n')
+                         b' PyThreadState_Get: no current thread')
 
 
 @unittest.skipUnless(threading, 'Threading required for this test.')