summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-26 15:08:24 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-26 15:08:24 (GMT)
commiteaec3597ddf41facfb7b6ec4f23a372beae88764 (patch)
treeca4e3b6bbf1927b5865d2f53660c00726bc39cf3 /Lib/test
parent59463d8340731e228bad77893d840cf43e52b98e (diff)
downloadcpython-eaec3597ddf41facfb7b6ec4f23a372beae88764.zip
cpython-eaec3597ddf41facfb7b6ec4f23a372beae88764.tar.gz
cpython-eaec3597ddf41facfb7b6ec4f23a372beae88764.tar.bz2
Issue #19760: Silence sysconfig's 'SO' key deprecation warnings in tests.
Change stacklevel in warnings.warn() for 'SO' key to 2.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_sysconfig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 5bc3f32..804c446 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -5,7 +5,7 @@ import subprocess
import shutil
from copy import copy
-from test.support import (run_unittest, TESTFN, unlink,
+from test.support import (run_unittest, TESTFN, unlink, check_warnings,
captured_stdout, skip_unless_symlink)
import sysconfig
@@ -378,8 +378,9 @@ class TestSysConfig(unittest.TestCase):
@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'))
+ with check_warnings(('', DeprecationWarning)):
+ 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')