diff options
author | Georg Brandl <georg@python.org> | 2011-02-20 11:18:09 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-02-20 11:18:09 (GMT) |
commit | 2cebdd48657546bc89dd96e85210d3b56b302e8f (patch) | |
tree | 160598cdd73a3152750a1fcb9fe1eb3efbcfa9f6 /Lib/unittest/test/test_runner.py | |
parent | fa2c61a22279f286e6e3abee0581fe66eb812737 (diff) | |
download | cpython-2cebdd48657546bc89dd96e85210d3b56b302e8f.zip cpython-2cebdd48657546bc89dd96e85210d3b56b302e8f.tar.gz cpython-2cebdd48657546bc89dd96e85210d3b56b302e8f.tar.bz2 |
Remove unittest methods scheduled for removal in 3.3 -- makes the unittest test suite pass again.
Diffstat (limited to 'Lib/unittest/test/test_runner.py')
-rw-r--r-- | Lib/unittest/test/test_runner.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/unittest/test/test_runner.py b/Lib/unittest/test/test_runner.py index 8e95410..1bd5183 100644 --- a/Lib/unittest/test/test_runner.py +++ b/Lib/unittest/test/test_runner.py @@ -257,19 +257,17 @@ class Test_TextTestRunner(unittest.TestCase): return [b.splitlines() for b in p.communicate()] opts = dict(stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=os.path.dirname(__file__)) - ae_msg = b'Please use assertEqual instead.' - at_msg = b'Please use assertTrue instead.' # 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.assertIn(b'OK', err) # check that the total number of warnings in the output is correct - self.assertEqual(len(out), 12) + self.assertEqual(len(out), 11) # check that the numbers of the different kind of warnings is correct for msg in [b'dw', b'iw', b'uw']: self.assertEqual(out.count(msg), 3) - for msg in [ae_msg, at_msg, b'rw']: + for msg in [b'rw']: self.assertEqual(out.count(msg), 1) args_list = ( @@ -294,11 +292,9 @@ class Test_TextTestRunner(unittest.TestCase): **opts) out, err = get_parse_out_err(p) self.assertIn(b'OK', err) - self.assertEqual(len(out), 14) + self.assertEqual(len(out), 13) for msg in [b'dw', b'iw', b'uw', b'rw']: self.assertEqual(out.count(msg), 3) - for msg in [ae_msg, at_msg]: - self.assertEqual(out.count(msg), 1) def testStdErrLookedUpAtInstantiationTime(self): # see issue 10786 |