mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#9424: Replace deprecated assert* methods in the Python test suite.
This commit is contained in:
parent
b8bc439b20
commit
b3aedd4862
170 changed files with 2388 additions and 2392 deletions
|
@ -8,15 +8,15 @@ class PEP3131Test(unittest.TestCase):
|
|||
ä = 1
|
||||
µ = 2 # this is a compatibility character
|
||||
蟒 = 3
|
||||
self.assertEquals(getattr(T, "\xe4"), 1)
|
||||
self.assertEquals(getattr(T, "\u03bc"), 2)
|
||||
self.assertEquals(getattr(T, '\u87d2'), 3)
|
||||
self.assertEqual(getattr(T, "\xe4"), 1)
|
||||
self.assertEqual(getattr(T, "\u03bc"), 2)
|
||||
self.assertEqual(getattr(T, '\u87d2'), 3)
|
||||
|
||||
def test_invalid(self):
|
||||
try:
|
||||
from test import badsyntax_3131
|
||||
except SyntaxError as s:
|
||||
self.assertEquals(str(s),
|
||||
self.assertEqual(str(s),
|
||||
"invalid character in identifier (badsyntax_3131.py, line 2)")
|
||||
else:
|
||||
self.fail("expected exception didn't occur")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue