summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
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)