Skip to content

Commit c4d92c8

Browse files
authored
simplify StartupImportTests (pythonGH-13096)
_osx_support and copyreg are not imported from site on macOS for now.
1 parent 98a1e06 commit c4d92c8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Lib/test/test_site.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -526,15 +526,15 @@ def test_startup_imports(self):
526526

527527
# http://bugs.python.org/issue19205
528528
re_mods = {'re', '_sre', 'sre_compile', 'sre_constants', 'sre_parse'}
529-
# _osx_support uses the re module in many placs
530-
if sys.platform != 'darwin':
531-
self.assertFalse(modules.intersection(re_mods), stderr)
529+
self.assertFalse(modules.intersection(re_mods), stderr)
530+
532531
# http://bugs.python.org/issue9548
533532
self.assertNotIn('locale', modules, stderr)
534-
if sys.platform != 'darwin':
535-
# http://bugs.python.org/issue19209
536-
self.assertNotIn('copyreg', modules, stderr)
537-
# http://bugs.python.org/issue19218>
533+
534+
# http://bugs.python.org/issue19209
535+
self.assertNotIn('copyreg', modules, stderr)
536+
537+
# http://bugs.python.org/issue19218
538538
collection_mods = {'_collections', 'collections', 'functools',
539539
'heapq', 'itertools', 'keyword', 'operator',
540540
'reprlib', 'types', 'weakref'

0 commit comments

Comments
 (0)