mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Issue #19760: Silence sysconfig's 'SO' key deprecation warnings in tests.
Change stacklevel in warnings.warn() for 'SO' key to 2.
This commit is contained in:
parent
59463d8340
commit
eaec3597dd
4 changed files with 10 additions and 8 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue