[Python-checkins] cpython: Update more usage of assertEqual

jason.coombs python-checkins at python.org
Sat Nov 16 01:42:20 CET 2013


http://hg.python.org/cpython/rev/039d6ace3d28
changeset:   87142:039d6ace3d28
user:        Jason R. Coombs <jaraco at jaraco.com>
date:        Fri Nov 15 19:41:57 2013 -0500
summary:
  Update more usage of assertEqual

files:
  Lib/distutils/tests/test_archive_util.py |  4 ++--
  Lib/distutils/tests/test_upload.py       |  6 +++---
  Lib/test/test_strftime.py                |  6 +++---
  3 files changed, 8 insertions(+), 8 deletions(-)


diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
--- a/Lib/distutils/tests/test_archive_util.py
+++ b/Lib/distutils/tests/test_archive_util.py
@@ -329,8 +329,8 @@
         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()
 
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py
--- a/Lib/distutils/tests/test_upload.py
+++ b/Lib/distutils/tests/test_upload.py
@@ -115,9 +115,9 @@
         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():
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py
--- a/Lib/test/test_strftime.py
+++ b/Lib/test/test_strftime.py
@@ -189,15 +189,15 @@
 
     @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__':

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list