summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-11-21 01:30:29 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-11-21 01:30:29 (GMT)
commit19f2aeba67b5b4dc4dfd589d02d4a0b0804e22ee (patch)
tree596b5a2c45b058ea3e0cdc49cb7539a21410b98d /Lib/test/test_sys.py
parentb65b4937e20be4a2d3311326909c77bbf2e1c4cd (diff)
downloadcpython-19f2aeba67b5b4dc4dfd589d02d4a0b0804e22ee.zip
cpython-19f2aeba67b5b4dc4dfd589d02d4a0b0804e22ee.tar.gz
cpython-19f2aeba67b5b4dc4dfd589d02d4a0b0804e22ee.tar.bz2
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. ........
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index ccad44a..aa30923 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -86,7 +86,7 @@ class SysModuleTest(unittest.TestCase):
try:
sys.exit(0)
except SystemExit as exc:
- self.assertEquals(exc.code, 0)
+ self.assertEqual(exc.code, 0)
except:
self.fail("wrong exception")
else:
@@ -97,7 +97,7 @@ class SysModuleTest(unittest.TestCase):
try:
sys.exit(42)
except SystemExit as exc:
- self.assertEquals(exc.code, 42)
+ self.assertEqual(exc.code, 42)
except:
self.fail("wrong exception")
else:
@@ -107,7 +107,7 @@ class SysModuleTest(unittest.TestCase):
try:
sys.exit((42,))
except SystemExit as exc:
- self.assertEquals(exc.code, 42)
+ self.assertEqual(exc.code, 42)
except:
self.fail("wrong exception")
else:
@@ -117,7 +117,7 @@ class SysModuleTest(unittest.TestCase):
try:
sys.exit("exit")
except SystemExit as exc:
- self.assertEquals(exc.code, "exit")
+ self.assertEqual(exc.code, "exit")
except:
self.fail("wrong exception")
else:
@@ -127,7 +127,7 @@ class SysModuleTest(unittest.TestCase):
try:
sys.exit((17, 23))
except SystemExit as exc:
- self.assertEquals(exc.code, (17, 23))
+ self.assertEqual(exc.code, (17, 23))
except:
self.fail("wrong exception")
else:
@@ -171,7 +171,7 @@ class SysModuleTest(unittest.TestCase):
orig = sys.getcheckinterval()
for n in 0, 100, 120, orig: # orig last to restore starting state
sys.setcheckinterval(n)
- self.assertEquals(sys.getcheckinterval(), n)
+ self.assertEqual(sys.getcheckinterval(), n)
def test_recursionlimit(self):
self.assertRaises(TypeError, sys.getrecursionlimit, 42)
@@ -438,8 +438,8 @@ class SysModuleTest(unittest.TestCase):
p = subprocess.Popen([sys.executable, "-c", code], stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
self.assertEqual(p.returncode, 1)
- self.assert_(b"UnicodeEncodeError:" in stderr,
- "%r not in %s" % (b"UniodeEncodeError:", ascii(stderr)))
+ self.assertTrue(b"UnicodeEncodeError:" in stderr,
+ "%r not in %s" % (b"UnicodeEncodeError:", ascii(stderr)))
def test_sys_flags(self):
self.assertTrue(sys.flags)