summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-12-01 01:45:53 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-12-01 01:45:53 (GMT)
commitf10c400b91e44c5c744f4ddc05d90933cba3a56b (patch)
tree1758938fac9668be340fbee352e4c15056f0d7af /Lib
parent60901876561a4ef665555e38fae1bdfe7bda78ba (diff)
downloadcpython-f10c400b91e44c5c744f4ddc05d90933cba3a56b.zip
cpython-f10c400b91e44c5c744f4ddc05d90933cba3a56b.tar.gz
cpython-f10c400b91e44c5c744f4ddc05d90933cba3a56b.tar.bz2
Fix test failure in debug builds and add NEWS entry for r86908
Diffstat (limited to 'Lib')
-rw-r--r--Lib/unittest/test/test_runner.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/unittest/test/test_runner.py b/Lib/unittest/test/test_runner.py
index efd4962..8f4aaaa 100644
--- a/Lib/unittest/test/test_runner.py
+++ b/Lib/unittest/test/test_runner.py
@@ -266,7 +266,7 @@ class Test_TextTestRunner(unittest.TestCase):
# no args -> all the warnings are printed, unittest warnings only once
p = subprocess.Popen([sys.executable, '_test_warnings.py'], **opts)
out, err = get_parse_out_err(p)
- self.assertEqual(err[-1], b'OK')
+ self.assertIn(b'OK', err)
# check that the total number of warnings in the output is correct
self.assertEqual(len(out), 12)
# check that the numbers of the different kind of warnings is correct
@@ -287,7 +287,7 @@ class Test_TextTestRunner(unittest.TestCase):
for args in args_list:
p = subprocess.Popen(args, **opts)
out, err = get_parse_out_err(p)
- self.assertEqual(err[-1], b'OK')
+ self.assertIn(b'OK', err)
self.assertEqual(len(out), 0)
@@ -296,7 +296,7 @@ class Test_TextTestRunner(unittest.TestCase):
p = subprocess.Popen([sys.executable, '_test_warnings.py', 'always'],
**opts)
out, err = get_parse_out_err(p)
- self.assertEqual(err[-1], b'OK')
+ self.assertIn(b'OK', err)
self.assertEqual(len(out), 14)
for msg in [b'dw', b'iw', b'uw', b'rw']:
self.assertEqual(out.count(msg), 3)