[New-bugs-announce] [issue21223] fix test_site/test_startup_imports when some of the extensions are built as builtins

Matthias Klose report at bugs.python.org
Mon Apr 14 22:25:13 CEST 2014


New submission from Matthias Klose:

fix test_site/test_startup_imports when some of the extensions are built as builtins.

--- a/Lib/test/test_site.py	Mon Apr 14 12:24:37 2014 -0400
+++ b/Lib/test/test_site.py	Mon Apr 14 22:17:57 2014 +0200
@@ -459,7 +459,8 @@
         # http://bugs.python.org/issue19218>
         collection_mods = {'_collections', 'collections', 'functools',
                            'heapq', 'itertools', 'keyword', 'operator',
-                           'reprlib', 'types', 'weakref'}
+                           'reprlib', 'types', 'weakref'
+                          }.difference(sys.builtin_module_names)
         self.assertFalse(modules.intersection(collection_mods), stderr)

the test now passes indepedent of the status of _collections (builtin or extension).

----------
components: Tests
keywords: patch
messages: 216200
nosy: doko, eric.snow
priority: normal
severity: normal
stage: patch review
status: open
title: fix test_site/test_startup_imports when some of the extensions are built as builtins
type: behavior
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21223>
_______________________________________


More information about the New-bugs-announce mailing list