summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sysconfig.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_sysconfig.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_sysconfig.py')
-rw-r--r--Lib/test/test_sysconfig.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 241f365..193b5f0 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -88,7 +88,7 @@ class TestSysConfig(unittest.TestCase):
shutil.rmtree(path)
def test_get_path_names(self):
- self.assertEquals(get_path_names(), sysconfig._SCHEME_KEYS)
+ self.assertEqual(get_path_names(), sysconfig._SCHEME_KEYS)
def test_get_paths(self):
scheme = get_paths()
@@ -98,7 +98,7 @@ class TestSysConfig(unittest.TestCase):
wanted.sort()
scheme = list(scheme.items())
scheme.sort()
- self.assertEquals(scheme, wanted)
+ self.assertEqual(scheme, wanted)
def test_get_path(self):
# xxx make real tests here
@@ -117,21 +117,21 @@ class TestSysConfig(unittest.TestCase):
sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) '
'[MSC v.1310 32 bit (Intel)]')
sys.platform = 'win32'
- self.assertEquals(get_platform(), 'win32')
+ self.assertEqual(get_platform(), 'win32')
# windows XP, amd64
os.name = 'nt'
sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) '
'[MSC v.1310 32 bit (Amd64)]')
sys.platform = 'win32'
- self.assertEquals(get_platform(), 'win-amd64')
+ self.assertEqual(get_platform(), 'win-amd64')
# windows XP, itanium
os.name = 'nt'
sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) '
'[MSC v.1310 32 bit (Itanium)]')
sys.platform = 'win32'
- self.assertEquals(get_platform(), 'win-ia64')
+ self.assertEqual(get_platform(), 'win-ia64')
# macbook
os.name = 'posix'
@@ -150,9 +150,9 @@ class TestSysConfig(unittest.TestCase):
maxint = sys.maxsize
try:
sys.maxsize = 2147483647
- self.assertEquals(get_platform(), 'macosx-10.3-ppc')
+ self.assertEqual(get_platform(), 'macosx-10.3-ppc')
sys.maxsize = 9223372036854775807
- self.assertEquals(get_platform(), 'macosx-10.3-ppc64')
+ self.assertEqual(get_platform(), 'macosx-10.3-ppc64')
finally:
sys.maxsize = maxint
@@ -169,9 +169,9 @@ class TestSysConfig(unittest.TestCase):
maxint = sys.maxsize
try:
sys.maxsize = 2147483647
- self.assertEquals(get_platform(), 'macosx-10.3-i386')
+ self.assertEqual(get_platform(), 'macosx-10.3-i386')
sys.maxsize = 9223372036854775807
- self.assertEquals(get_platform(), 'macosx-10.3-x86_64')
+ self.assertEqual(get_platform(), 'macosx-10.3-x86_64')
finally:
sys.maxsize = maxint
@@ -182,33 +182,33 @@ class TestSysConfig(unittest.TestCase):
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3')
- self.assertEquals(get_platform(), 'macosx-10.4-fat')
+ self.assertEqual(get_platform(), 'macosx-10.4-fat')
get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3')
- self.assertEquals(get_platform(), 'macosx-10.4-intel')
+ self.assertEqual(get_platform(), 'macosx-10.4-intel')
get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3')
- self.assertEquals(get_platform(), 'macosx-10.4-fat3')
+ self.assertEqual(get_platform(), 'macosx-10.4-fat3')
get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3')
- self.assertEquals(get_platform(), 'macosx-10.4-universal')
+ self.assertEqual(get_platform(), 'macosx-10.4-universal')
get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3')
- self.assertEquals(get_platform(), 'macosx-10.4-fat64')
+ self.assertEqual(get_platform(), 'macosx-10.4-fat64')
for arch in ('ppc', 'i386', 'x86_64', 'ppc64'):
get_config_vars()['CFLAGS'] = ('-arch %s -isysroot '
@@ -216,7 +216,7 @@ class TestSysConfig(unittest.TestCase):
'-fno-strict-aliasing -fno-common '
'-dynamic -DNDEBUG -g -O3'%(arch,))
- self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,))
+ self.assertEqual(get_platform(), 'macosx-10.4-%s'%(arch,))
# linux debian sarge
os.name = 'posix'
@@ -226,7 +226,7 @@ class TestSysConfig(unittest.TestCase):
self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7',
'#1 Mon Apr 30 17:25:38 CEST 2007', 'i686'))
- self.assertEquals(get_platform(), 'linux-i686')
+ self.assertEqual(get_platform(), 'linux-i686')
# XXX more platforms to tests here
@@ -243,7 +243,7 @@ class TestSysConfig(unittest.TestCase):
def test_get_scheme_names(self):
wanted = ('nt', 'nt_user', 'os2', 'os2_home', 'osx_framework_user',
'posix_home', 'posix_prefix', 'posix_user')
- self.assertEquals(get_scheme_names(), wanted)
+ self.assertEqual(get_scheme_names(), wanted)
@skip_unless_symlink
def test_symlink(self):
@@ -275,7 +275,7 @@ class TestSysConfig(unittest.TestCase):
for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
global_path = get_path(name, 'posix_prefix')
user_path = get_path(name, 'posix_user')
- self.assertEquals(user_path, global_path.replace(base, user))
+ self.assertEqual(user_path, global_path.replace(base, user))
def test_main(self):
# just making sure _main() runs and returns things in the stdout