classification
Title: fix test_site/test_startup_imports when some of the extensions are built as builtins
Type: behavior Stage: patch review
Components: Tests Versions: Python 3.5, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, doko, eric.snow, ncoghlan, python-dev
Priority: normal Keywords: patch

Created on 2014-04-14 20:25 by doko, last changed 2014-04-15 18:50 by doko. This issue is now closed.

Messages (3)
msg216200 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2014-04-14 20:25
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).
msg216224 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-04-14 21:27
Looks good to me.  This should not impact the standard build, but is useful for alternate builds.  Does something similar need to happen to also exclude frozen modules?
msg216359 - (view) Author: Roundup Robot (python-dev) Date: 2014-04-15 18:38
New changeset ebb9595af548 by doko in branch '3.4':
- Issue #21223: Pass test_site/test_startup_imports when some of the extensions
http://hg.python.org/cpython/rev/ebb9595af548
History
Date User Action Args
2014-04-15 18:50:23dokosetstatus: open -> closed
resolution: fixed
2014-04-15 18:38:40python-devsetnosy: + python-dev
messages: + msg216359
2014-04-14 21:27:48eric.snowsetnosy: + brett.cannon, ncoghlan
messages: + msg216224
2014-04-14 20:25:13dokocreate