mirror of
https://github.com/python/cpython.git
synced 2025-09-14 12:46:49 +00:00
Merged revisions 71758 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71758 | tarek.ziade | 2009-04-20 09:53:55 +0200 (Mon, 20 Apr 2009) | 1 line #5795 sysconfig._config_vars was shadowed in tearDown ........
This commit is contained in:
parent
fd838e6c84
commit
7d3a62629f
1 changed files with 4 additions and 3 deletions
|
@ -18,7 +18,8 @@ from distutils.util import strtobool
|
||||||
from distutils.util import rfc822_escape
|
from distutils.util import rfc822_escape
|
||||||
|
|
||||||
from distutils import util # used to patch _environ_checked
|
from distutils import util # used to patch _environ_checked
|
||||||
from distutils.sysconfig import get_config_vars, _config_vars
|
from distutils.sysconfig import get_config_vars
|
||||||
|
from distutils import sysconfig
|
||||||
|
|
||||||
class utilTestCase(unittest.TestCase):
|
class utilTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ class utilTestCase(unittest.TestCase):
|
||||||
self.join = os.path.join
|
self.join = os.path.join
|
||||||
self.isabs = os.path.isabs
|
self.isabs = os.path.isabs
|
||||||
self.splitdrive = os.path.splitdrive
|
self.splitdrive = os.path.splitdrive
|
||||||
self._config_vars = copy(_config_vars)
|
self._config_vars = copy(sysconfig._config_vars)
|
||||||
|
|
||||||
# patching os.uname
|
# patching os.uname
|
||||||
if hasattr(os, 'uname'):
|
if hasattr(os, 'uname'):
|
||||||
|
@ -58,7 +59,7 @@ class utilTestCase(unittest.TestCase):
|
||||||
os.uname = self.uname
|
os.uname = self.uname
|
||||||
else:
|
else:
|
||||||
del os.uname
|
del os.uname
|
||||||
_config_vars = copy(self._config_vars)
|
sysconfig._config_vars = copy(self._config_vars)
|
||||||
|
|
||||||
def _set_uname(self, uname):
|
def _set_uname(self, uname):
|
||||||
self._uname = uname
|
self._uname = uname
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue