diff options
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r-- | Lib/test/test_file.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index c48b8d0c76..bb0da792f5 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -25,7 +25,7 @@ class AutoFileTests(unittest.TestCase): # verify weak references p = proxy(self.f) p.write(b'teststring') - self.assertEquals(self.f.tell(), p.tell()) + self.assertEqual(self.f.tell(), p.tell()) self.f.close() self.f = None self.assertRaises(ReferenceError, getattr, p, 'tell') @@ -44,7 +44,7 @@ class AutoFileTests(unittest.TestCase): a = array('b', b'x'*10) self.f = self.open(TESTFN, 'rb') n = self.f.readinto(a) - self.assertEquals(b'12', a.tobytes()[:n]) + self.assertEqual(b'12', a.tobytes()[:n]) def testReadinto_text(self): # verify readinto refuses text files @@ -61,7 +61,7 @@ class AutoFileTests(unittest.TestCase): self.f.close() self.f = self.open(TESTFN, 'rb') buf = self.f.read() - self.assertEquals(buf, b'12') + self.assertEqual(buf, b'12') def testWritelinesIntegers(self): # verify writelines with integers @@ -82,7 +82,7 @@ class AutoFileTests(unittest.TestCase): def testErrors(self): f = self.f - self.assertEquals(f.name, TESTFN) + self.assertEqual(f.name, TESTFN) self.assertTrue(not f.isatty()) self.assertTrue(not f.closed) @@ -118,12 +118,12 @@ class AutoFileTests(unittest.TestCase): self.assertRaises(ValueError, method, *args) # file is closed, __exit__ shouldn't do anything - self.assertEquals(self.f.__exit__(None, None, None), None) + self.assertEqual(self.f.__exit__(None, None, None), None) # it must also return None if an exception was given try: 1/0 except: - self.assertEquals(self.f.__exit__(*sys.exc_info()), None) + self.assertEqual(self.f.__exit__(*sys.exc_info()), None) def testReadWhenWriting(self): self.assertRaises(IOError, self.f.read) @@ -189,7 +189,7 @@ class OtherFileTests(unittest.TestCase): f.close() except IOError as msg: self.fail('error setting buffer size %d: %s' % (s, str(msg))) - self.assertEquals(d, s) + self.assertEqual(d, s) def testTruncateOnWindows(self): # SF bug <http://www.python.org/sf/801631> |