summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-18 21:12:30 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-09-18 21:12:30 (GMT)
commitc1b7e7f8bbcae936a5e75277e9e86d9ebec5469f (patch)
tree8f179ac3234e344d366bce980199e0c4be71ca25 /Lib/test
parentf30b5ae6fd03b497a43d30489663a6baa9f2d800 (diff)
downloadcpython-c1b7e7f8bbcae936a5e75277e9e86d9ebec5469f.zip
cpython-c1b7e7f8bbcae936a5e75277e9e86d9ebec5469f.tar.gz
cpython-c1b7e7f8bbcae936a5e75277e9e86d9ebec5469f.tar.bz2
A few style changes originally done in the distutils2 repo
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sysconfig.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 773d523..08b40a1 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -39,7 +39,7 @@ class TestSysConfig(unittest.TestCase):
self._config_vars = copy(sysconfig._CONFIG_VARS)
self._added_envvars = []
self._changed_envvars = []
- for var in ('MACOSX_DEPLOYMENT_TARGET', 'Path'):
+ for var in ('MACOSX_DEPLOYMENT_TARGET', 'PATH'):
if var in os.environ:
self._changed_envvars.append((var, os.environ[var]))
else:
@@ -87,21 +87,19 @@ class TestSysConfig(unittest.TestCase):
scheme = get_paths()
default_scheme = _get_default_scheme()
wanted = _expand_vars(default_scheme, None)
- wanted = list(wanted.items())
- wanted.sort()
- scheme = list(scheme.items())
- scheme.sort()
+ wanted = sorted(wanted.items())
+ scheme = sorted(scheme.items())
self.assertEqual(scheme, wanted)
def test_get_path(self):
- # xxx make real tests here
+ # XXX make real tests here
for scheme in _SCHEMES:
for name in _SCHEMES[scheme]:
res = get_path(name, scheme)
def test_get_config_vars(self):
cvars = get_config_vars()
- self.assertTrue(isinstance(cvars, dict))
+ self.assertIsInstance(cvars, dict)
self.assertTrue(cvars)
def test_get_platform(self):
@@ -236,8 +234,8 @@ class TestSysConfig(unittest.TestCase):
# On Windows, the EXE needs to know where pythonXY.dll is at so we have
# to add the directory to the path.
if sys.platform == "win32":
- os.environ["Path"] = "{};{}".format(
- os.path.dirname(sys.executable), os.environ["Path"])
+ os.environ["PATH"] = "{};{}".format(
+ os.path.dirname(sys.executable), os.environ["PATH"])
# Issue 7880
def get(python):