diff options
author | Christian Heimes <christian@cheimes.de> | 2013-10-12 10:32:21 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-10-12 10:32:21 (GMT) |
commit | 179a3dbc9e12f2de4894ceff9bc2b7c33003d151 (patch) | |
tree | 2163bef004535e223725363b5cf0fe4beae48eb9 /Lib/test/test_site.py | |
parent | cbf6e95de5ef9f38c4eac074488884dc80dcc6de (diff) | |
download | cpython-179a3dbc9e12f2de4894ceff9bc2b7c33003d151.zip cpython-179a3dbc9e12f2de4894ceff9bc2b7c33003d151.tar.gz cpython-179a3dbc9e12f2de4894ceff9bc2b7c33003d151.tar.bz2 |
Issue #19205: add debugging output for failing test on Snow Leopard
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r-- | Lib/test/test_site.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 5147edc..26ae4d2 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -425,19 +425,24 @@ class StartupImportTests(unittest.TestCase): def test_startup_imports(self): # This tests checks which modules are loaded by Python when it # initially starts upon startup. - args = [sys.executable, '-I', '-c', - 'import sys; print(set(sys.modules))'] - stdout = subprocess.check_output(args) - modules = eval(stdout.decode('utf-8')) + popen = subprocess.Popen([sys.executable, '-I', '-v', '-c', + 'import sys; print(set(sys.modules))'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + stdout, stderr = popen.communicate() + stdout = stdout.decode('utf-8') + stderr = stderr.decode('utf-8') + modules = eval(stdout) + self.assertIn('site', modules) # http://bugs.python.org/issue19205 re_mods = {'re', '_sre', 'sre_compile', 'sre_constants', 'sre_parse'} - self.assertFalse(modules.intersection(re_mods)) + self.assertFalse(modules.intersection(re_mods), stderr) # http://bugs.python.org/issue9548 - self.assertNotIn('locale', modules) + self.assertNotIn('locale', modules, stderr) # http://bugs.python.org/issue19209 - self.assertNotIn('copyreg', modules) + self.assertNotIn('copyreg', modules, stderr) if __name__ == "__main__": |