Fix test_capi for Windows: strip newline characters
Fix test_no_FatalError_infinite_loop() introduced by r81142 (issue #3605).
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 7a6870d..246e25b 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -45,9 +45,9 @@
(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.')