[Python-checkins] simplify StartupImportTests (GH-13096)
Inada Naoki
webhook-mailer at python.org
Sun May 5 05:06:46 EDT 2019
https://github.com/python/cpython/commit/c4d92c8ada7ecfc479ebb1dd4a819c9202155970
commit: c4d92c8ada7ecfc479ebb1dd4a819c9202155970
branch: master
author: Inada Naoki <songofacandy at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-05-05T18:06:30+09:00
summary:
simplify StartupImportTests (GH-13096)
_osx_support and copyreg are not imported from site on macOS for now.
files:
M Lib/test/test_site.py
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 8643da0540f3..41c422991950 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -526,15 +526,15 @@ def test_startup_imports(self):
# http://bugs.python.org/issue19205
re_mods = {'re', '_sre', 'sre_compile', 'sre_constants', 'sre_parse'}
- # _osx_support uses the re module in many placs
- if sys.platform != 'darwin':
- self.assertFalse(modules.intersection(re_mods), stderr)
+ self.assertFalse(modules.intersection(re_mods), stderr)
+
# http://bugs.python.org/issue9548
self.assertNotIn('locale', modules, stderr)
- if sys.platform != 'darwin':
- # http://bugs.python.org/issue19209
- self.assertNotIn('copyreg', modules, stderr)
- # http://bugs.python.org/issue19218>
+
+ # http://bugs.python.org/issue19209
+ self.assertNotIn('copyreg', modules, stderr)
+
+ # http://bugs.python.org/issue19218
collection_mods = {'_collections', 'collections', 'functools',
'heapq', 'itertools', 'keyword', 'operator',
'reprlib', 'types', 'weakref'
More information about the Python-checkins
mailing list