]> granicus.if.org Git - python/commitdiff
Update more usage of assertEqual
authorJason R. Coombs <jaraco@jaraco.com>
Sat, 16 Nov 2013 00:41:57 +0000 (19:41 -0500)
committerJason R. Coombs <jaraco@jaraco.com>
Sat, 16 Nov 2013 00:41:57 +0000 (19:41 -0500)
Lib/distutils/tests/test_archive_util.py
Lib/distutils/tests/test_upload.py
Lib/test/test_strftime.py

index 581c0cc841cc2321f5ba802496e703f61f7f5314..caa0db20b7dfeceba64533c99b27e9f6c5bcfb5f 100644 (file)
@@ -329,8 +329,8 @@ class ArchiveUtilTestCase(support.TempdirManager,
         archive = tarfile.open(archive_name)
         try:
             for member in archive.getmembers():
-                self.assertEquals(member.uid, 0)
-                self.assertEquals(member.gid, 0)
+                self.assertEqual(member.uid, 0)
+                self.assertEqual(member.gid, 0)
         finally:
             archive.close()
 
index 7d704cf1667f09d79caed2a08e1689fe13412245..9a2265eeb880c681659bbf878235c4f7a0038386 100644 (file)
@@ -115,9 +115,9 @@ class uploadTestCase(PyPIRCCommandTestCase):
         headers = dict(self.last_open.req.headers)
         self.assertEqual(headers['Content-length'], '2087')
         self.assert_(headers['Content-type'].startswith('multipart/form-data'))
-        self.assertEquals(self.last_open.req.get_method(), 'POST')
-        self.assertEquals(self.last_open.req.get_full_url(),
-                          'https://pypi.python.org/pypi')
+        self.assertEqual(self.last_open.req.get_method(), 'POST')
+        expected_url = 'https://pypi.python.org/pypi'
+        self.assertEqual(self.last_open.req.get_full_url(), expected_url)
         self.assert_(b'xxx' in self.last_open.req.data)
 
 def test_suite():
index 78604c665a57ee71832ea1dce249a56e90c88c50..61215a15ba36e0d7f07e93925879751b90e06c68 100644 (file)
@@ -189,15 +189,15 @@ class Y1900Tests(unittest.TestCase):
 
     @unittest.skipIf(sys.platform == "win32", "Doesn't apply on Windows")
     def test_y_before_1900_nonwin(self):
-        self.assertEquals(
+        self.assertEqual(
             time.strftime("%y", (1899, 1, 1, 0, 0, 0, 0, 0, 0)), "99")
 
     def test_y_1900(self):
-        self.assertEquals(
+        self.assertEqual(
             time.strftime("%y", (1900, 1, 1, 0, 0, 0, 0, 0, 0)), "00")
 
     def test_y_after_1900(self):
-        self.assertEquals(
+        self.assertEqual(
             time.strftime("%y", (2013, 1, 1, 0, 0, 0, 0, 0, 0)), "13")
 
 if __name__ == '__main__':