summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sysconfig.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2013-11-21 23:57:14 (GMT)
committerBarry Warsaw <barry@python.org>2013-11-21 23:57:14 (GMT)
commit197a7702310e6a6cf67b658c66dd3b43ee12439b (patch)
tree750625effd3962e3eb49b27a4cb94d28b719a759 /Lib/test/test_sysconfig.py
parent18fc7be80d77f68a0e7ab54e6c222a4b7a3bc774 (diff)
downloadcpython-197a7702310e6a6cf67b658c66dd3b43ee12439b.zip
cpython-197a7702310e6a6cf67b658c66dd3b43ee12439b.tar.gz
cpython-197a7702310e6a6cf67b658c66dd3b43ee12439b.tar.bz2
- Issue #19555: Restore sysconfig.get_config_var('SO'), with a
DeprecationWarning pointing people at $EXT_SUFFIX.
Diffstat (limited to 'Lib/test/test_sysconfig.py')
-rw-r--r--Lib/test/test_sysconfig.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 2968604..5bc3f32 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -369,6 +369,25 @@ class TestSysConfig(unittest.TestCase):
os.chdir(cwd)
self.assertEqual(srcdir, srcdir2)
+ @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None,
+ 'EXT_SUFFIX required for this test')
+ def test_SO_deprecation(self):
+ self.assertWarns(DeprecationWarning,
+ sysconfig.get_config_var, 'SO')
+
+ @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None,
+ 'EXT_SUFFIX required for this test')
+ def test_SO_value(self):
+ self.assertEqual(sysconfig.get_config_var('SO'),
+ sysconfig.get_config_var('EXT_SUFFIX'))
+
+ @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None,
+ 'EXT_SUFFIX required for this test')
+ def test_SO_in_vars(self):
+ vars = sysconfig.get_config_vars()
+ self.assertIsNotNone(vars['SO'])
+ self.assertEqual(vars['SO'], vars['EXT_SUFFIX'])
+
class MakefileTests(unittest.TestCase):