mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
This commit is contained in:
parent
b65b4937e2
commit
19f2aeba67
164 changed files with 2281 additions and 2279 deletions
|
@ -111,13 +111,13 @@ class BaseTest(unittest.TestCase):
|
|||
except AttributeError:
|
||||
# StringIO.StringIO lacks a reset() method.
|
||||
actual_lines = stream.getvalue().splitlines()
|
||||
self.assertEquals(len(actual_lines), len(expected_values))
|
||||
self.assertEqual(len(actual_lines), len(expected_values))
|
||||
for actual, expected in zip(actual_lines, expected_values):
|
||||
match = pat.search(actual)
|
||||
if not match:
|
||||
self.fail("Log line does not match expected pattern:\n" +
|
||||
actual)
|
||||
self.assertEquals(tuple(match.groups()), expected)
|
||||
self.assertEqual(tuple(match.groups()), expected)
|
||||
s = stream.read()
|
||||
if s:
|
||||
self.fail("Remaining output at end of log stream:\n" + s)
|
||||
|
@ -689,7 +689,7 @@ class ConfigFileTest(BaseTest):
|
|||
except RuntimeError:
|
||||
logging.exception("just testing")
|
||||
sys.stdout.seek(0)
|
||||
self.assertEquals(output.getvalue(),
|
||||
self.assertEqual(output.getvalue(),
|
||||
"ERROR:root:just testing\nGot a [RuntimeError]\n")
|
||||
# Original logger output is empty
|
||||
self.assert_log_lines([])
|
||||
|
@ -807,7 +807,7 @@ class SocketHandlerTest(BaseTest):
|
|||
logger = logging.getLogger("tcp")
|
||||
logger.error("spam")
|
||||
logger.debug("eggs")
|
||||
self.assertEquals(self.get_output(), "spam\neggs\n")
|
||||
self.assertEqual(self.get_output(), "spam\neggs\n")
|
||||
|
||||
|
||||
class MemoryTest(BaseTest):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue