cpython: 9c61f46ea6b4 (original) (raw)
Mercurial > cpython
changeset 72410:9c61f46ea6b4
Make regrtest look at internal dicts in sysconfig. This reveals problems in the packaging test suite, which I’ll look into after the regrtest checks are made more usable (see #12314). [#12314]
Éric Araujo merwok@netwok.org | |
---|---|
date | Mon, 19 Sep 2011 05:10:45 +0200 |
parents | 8aaf81d4ea66 |
children | cb56ab0cb9c5 |
files | Lib/test/regrtest.py |
diffstat | 1 files changed, 24 insertions(+), 1 deletions(-)[+] [-] Lib/test/regrtest.py 25 |
line wrap: on
line diff
--- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -965,7 +965,9 @@ class saved_test_environment: 'warnings.filters', 'asyncore.socket_map', 'logging._handlers', 'logging._handlerList', 'sys.gettrace', 'sys.warnoptions', 'threading._dangling',
'multiprocessing.process._dangling')[](#l1.7)
'multiprocessing.process._dangling',[](#l1.8)
'sysconfig._CONFIG_VARS', 'sysconfig._SCHEMES',[](#l1.9)
)[](#l1.10)
def get_sys_argv(self): return id(sys.argv), sys.argv, sys.argv[:] @@ -1083,6 +1085,27 @@ class saved_test_environment: multiprocessing.process._dangling.clear() multiprocessing.process._dangling.update(saved)
- def get_sysconfig__CONFIG_VARS(self):
# make sure the dict is initialized[](#l1.19)
sysconfig.get_config_var('prefix')[](#l1.20)
return (id(sysconfig._CONFIG_VARS), sysconfig._CONFIG_VARS,[](#l1.21)
dict(sysconfig._CONFIG_VARS))[](#l1.22)
- def restore_sysconfig__CONFIG_VARS(self, saved):
sysconfig._CONFIG_VARS = saved[1][](#l1.24)
sysconfig._CONFIG_VARS.clear()[](#l1.25)
sysconfig._CONFIG_VARS.update(saved[2])[](#l1.26)
- def get_sysconfig__SCHEMES(self):
# it's mildly evil to look at the internal attribute, but it's easier[](#l1.29)
# than copying a RawConfigParser object[](#l1.30)
return (id(sysconfig._SCHEMES), sysconfig._SCHEMES._sections,[](#l1.31)
sysconfig._SCHEMES._sections.copy())[](#l1.32)
- def restore_sysconfig__SCHEMES(self, saved):
sysconfig._SCHEMES._sections = saved[1][](#l1.34)
sysconfig._SCHEMES._sections.clear()[](#l1.35)
sysconfig._SCHEMES._sections.update(saved[2])[](#l1.36)
+ + def resource_info(self): for name in self.resources: method_suffix = name.replace('.', '_')