Skip to content

Commit 905ce9e

Browse files
simplify StartupImportTests (GH-13096)
_osx_support and copyreg are not imported from site on macOS for now. (cherry picked from commit c4d92c8) Co-authored-by: Inada Naoki <[email protected]>
1 parent 2b5ffc0 commit 905ce9e

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
@@ -518,15 +518,15 @@ def test_startup_imports(self):
518518

519519
# http://bugs.python.org/issue19205
520520
re_mods = {'re', '_sre', 'sre_compile', 'sre_constants', 'sre_parse'}
521-
# _osx_support uses the re module in many placs
522-
if sys.platform != 'darwin':
523-
self.assertFalse(modules.intersection(re_mods), stderr)
521+
self.assertFalse(modules.intersection(re_mods), stderr)
522+
524523
# http://bugs.python.org/issue9548
525524
self.assertNotIn('locale', modules, stderr)
526-
if sys.platform != 'darwin':
527-
# http://bugs.python.org/issue19209
528-
self.assertNotIn('copyreg', modules, stderr)
529-
# http://bugs.python.org/issue19218>
525+
526+
# http://bugs.python.org/issue19209
527+
self.assertNotIn('copyreg', modules, stderr)
528+
529+
# http://bugs.python.org/issue19218
530530
collection_mods = {'_collections', 'collections', 'functools',
531531
'heapq', 'itertools', 'keyword', 'operator',
532532
'reprlib', 'types', 'weakref'

0 commit comments

Comments
 (0)