aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/distutils/tests/test_build_clib.py
diff options
context:
space:
mode:
authorLumír 'Frenzy' Balhar <frenzy.madness@gmail.com>2021-04-23 14:02:41 +0200
committerGitHub <noreply@github.com>2021-04-23 14:02:41 +0200
commit90d02e5e63e2cb8f66a2c0dd2ea8d7d4f45f4ebf (patch)
tree5279da33ebadd26e8040b394929cce64f861acab /Lib/distutils/tests/test_build_clib.py
parentb9ad88be0304136c3fe5959c65a5d2c75490cd80 (diff)
downloadcpython-90d02e5e63e2cb8f66a2c0dd2ea8d7d4f45f4ebf.tar.gz
cpython-90d02e5e63e2cb8f66a2c0dd2ea8d7d4f45f4ebf.zip
bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation of the PEP) (GH-23142)
This change: * merges `distutils.sysconfig` into `sysconfig` while keeping the original functionality and * marks `distutils.sysconfig` as deprecated https://bugs.python.org/issue41282
Diffstat (limited to 'Lib/distutils/tests/test_build_clib.py')
-rw-r--r--Lib/distutils/tests/test_build_clib.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_build_clib.py b/Lib/distutils/tests/test_build_clib.py
index abd8313770e..19e012a58ce 100644
--- a/Lib/distutils/tests/test_build_clib.py
+++ b/Lib/distutils/tests/test_build_clib.py
@@ -2,6 +2,7 @@
import unittest
import os
import sys
+import sysconfig
from test.support import run_unittest, missing_compiler_executable
@@ -13,6 +14,15 @@ class BuildCLibTestCase(support.TempdirManager,
support.LoggingSilencer,
unittest.TestCase):
+ def setUp(self):
+ super().setUp()
+ self._backup_CONFIG_VARS = dict(sysconfig._CONFIG_VARS)
+
+ def tearDown(self):
+ super().tearDown()
+ sysconfig._CONFIG_VARS.clear()
+ sysconfig._CONFIG_VARS.update(self._backup_CONFIG_VARS)
+
def test_check_library_dist(self):
pkg_dir, dist = self.create_dist()
cmd = build_clib(dist)