summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-12-21 21:19:46 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-12-21 21:19:46 (GMT)
commit492b9893e13ee1967df2c3adf2d2bd6fe12b995b (patch)
tree983b00d3acfed0c722c682b6f96e6b9b782a0dd1 /Lib
parent17c93260a62ac895f336351158e6fdaa6b117bcb (diff)
downloadcpython-492b9893e13ee1967df2c3adf2d2bd6fe12b995b.zip
cpython-492b9893e13ee1967df2c3adf2d2bd6fe12b995b.tar.gz
cpython-492b9893e13ee1967df2c3adf2d2bd6fe12b995b.tar.bz2
Fix DeprecationWarnings in test suite
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/tests/test_dist.py16
-rw-r--r--Lib/distutils/tests/test_upload.py10
-rw-r--r--Lib/test/test_shutil.py14
-rw-r--r--Lib/test/test_strftime.py6
4 files changed, 23 insertions, 23 deletions
diff --git a/Lib/distutils/tests/test_dist.py b/Lib/distutils/tests/test_dist.py
index 9a8ca19..61ac57d 100644
--- a/Lib/distutils/tests/test_dist.py
+++ b/Lib/distutils/tests/test_dist.py
@@ -406,14 +406,14 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
PKG_INFO.seek(0)
metadata.read_pkg_file(PKG_INFO)
- self.assertEquals(metadata.name, "package")
- self.assertEquals(metadata.version, "1.0")
- self.assertEquals(metadata.description, "xxx")
- self.assertEquals(metadata.download_url, 'http://example.com')
- self.assertEquals(metadata.keywords, ['one', 'two'])
- self.assertEquals(metadata.platforms, ['UNKNOWN'])
- self.assertEquals(metadata.obsoletes, None)
- self.assertEquals(metadata.requires, ['foo'])
+ self.assertEqual(metadata.name, "package")
+ self.assertEqual(metadata.version, "1.0")
+ self.assertEqual(metadata.description, "xxx")
+ self.assertEqual(metadata.download_url, 'http://example.com')
+ self.assertEqual(metadata.keywords, ['one', 'two'])
+ self.assertEqual(metadata.platforms, ['UNKNOWN'])
+ self.assertEqual(metadata.obsoletes, None)
+ self.assertEqual(metadata.requires, ['foo'])
def test_suite():
suite = unittest.TestSuite()
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py
index a474596..df35b42 100644
--- a/Lib/distutils/tests/test_upload.py
+++ b/Lib/distutils/tests/test_upload.py
@@ -114,11 +114,11 @@ class uploadTestCase(PyPIRCCommandTestCase):
# what did we send ?
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(),
- 'http://pypi.python.org/pypi')
- self.assert_(b'xxx' in self.last_open.req.data)
+ self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
+ self.assertEqual(self.last_open.req.get_method(), 'POST')
+ self.assertEqual(self.last_open.req.get_full_url(),
+ 'http://pypi.python.org/pypi')
+ self.assertIn(b'xxx', self.last_open.req.data)
def test_suite():
return unittest.makeSuite(uploadTestCase)
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 411c19a..96028a0 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -742,15 +742,15 @@ class TestShutil(unittest.TestCase):
os.chmod(restrictive_subdir, 0o600)
shutil.copytree(src_dir, dst_dir)
- self.assertEquals(os.stat(src_dir).st_mode, os.stat(dst_dir).st_mode)
- self.assertEquals(os.stat(os.path.join(src_dir, 'permissive.txt')).st_mode,
- os.stat(os.path.join(dst_dir, 'permissive.txt')).st_mode)
- self.assertEquals(os.stat(os.path.join(src_dir, 'restrictive.txt')).st_mode,
- os.stat(os.path.join(dst_dir, 'restrictive.txt')).st_mode)
+ self.assertEqual(os.stat(src_dir).st_mode, os.stat(dst_dir).st_mode)
+ self.assertEqual(os.stat(os.path.join(src_dir, 'permissive.txt')).st_mode,
+ os.stat(os.path.join(dst_dir, 'permissive.txt')).st_mode)
+ self.assertEqual(os.stat(os.path.join(src_dir, 'restrictive.txt')).st_mode,
+ os.stat(os.path.join(dst_dir, 'restrictive.txt')).st_mode)
restrictive_subdir_dst = os.path.join(dst_dir,
os.path.split(restrictive_subdir)[1])
- self.assertEquals(os.stat(restrictive_subdir).st_mode,
- os.stat(restrictive_subdir_dst).st_mode)
+ self.assertEqual(os.stat(restrictive_subdir).st_mode,
+ os.stat(restrictive_subdir_dst).st_mode)
@unittest.skipIf(os.name == 'nt', 'temporarily disabled on Windows')
@unittest.skipUnless(hasattr(os, 'link'), 'requires os.link')
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py
index 78c9c5b..4f39cc7 100644
--- a/Lib/test/test_strftime.py
+++ b/Lib/test/test_strftime.py
@@ -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")
def test_main():