summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_site.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-11-20 19:04:17 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-11-20 19:04:17 (GMT)
commitb3aedd48621ed9d33b5f42f946b256bce4a50673 (patch)
tree2297c8ebce1b09621e1d98096c1603896d9a0f0c /Lib/test/test_site.py
parentb8bc439b2093add9b313bcca2cc507a2d0e87764 (diff)
downloadcpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.zip
cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.gz
cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.bz2
#9424: Replace deprecated assert* methods in the Python test suite.
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r--Lib/test/test_site.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 8d03224..94d6699 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -134,7 +134,7 @@ class HelperFunctionsTests(unittest.TestCase):
user_base = site.getuserbase()
# the call sets site.USER_BASE
- self.assertEquals(site.USER_BASE, user_base)
+ self.assertEqual(site.USER_BASE, user_base)
# let's set PYTHONUSERBASE and see if it uses it
site.USER_BASE = None
@@ -152,7 +152,7 @@ class HelperFunctionsTests(unittest.TestCase):
user_site = site.getusersitepackages()
# the call sets USER_BASE *and* USER_SITE
- self.assertEquals(site.USER_SITE, user_site)
+ self.assertEqual(site.USER_SITE, user_site)
self.assertTrue(user_site.startswith(site.USER_BASE), user_site)
def test_getsitepackages(self):
@@ -162,19 +162,19 @@ class HelperFunctionsTests(unittest.TestCase):
if sys.platform in ('os2emx', 'riscos'):
self.assertEqual(len(dirs), 1)
wanted = os.path.join('xoxo', 'Lib', 'site-packages')
- self.assertEquals(dirs[0], wanted)
+ self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
self.assertEqual(len(dirs), 2)
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
'site-packages')
- self.assertEquals(dirs[0], wanted)
+ self.assertEqual(dirs[0], wanted)
wanted = os.path.join('xoxo', 'lib', 'site-python')
- self.assertEquals(dirs[1], wanted)
+ self.assertEqual(dirs[1], wanted)
else:
self.assertEqual(len(dirs), 2)
- self.assertEquals(dirs[0], 'xoxo')
+ self.assertEqual(dirs[0], 'xoxo')
wanted = os.path.join('xoxo', 'lib', 'site-packages')
- self.assertEquals(dirs[1], wanted)
+ self.assertEqual(dirs[1], wanted)
# let's try the specific Apple location
if (sys.platform == "darwin" and
@@ -184,7 +184,7 @@ class HelperFunctionsTests(unittest.TestCase):
self.assertEqual(len(dirs), 3)
wanted = os.path.join('/Library', 'Python', sys.version[:3],
'site-packages')
- self.assertEquals(dirs[2], wanted)
+ self.assertEqual(dirs[2], wanted)
class PthFile(object):
"""Helper class for handling testing of .pth files"""