This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.4, Python 3.5
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 2022-04-11 14:58 by admin. 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/	Mon Apr 14 12:24:37 2014 -0400
+++ b/Lib/test/	Mon Apr 14 22:17:57 2014 +0200
@@ -459,7 +459,8 @@
         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) (Python triager) 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
Date User Action Args
2022-04-11 14:58:01adminsetgithub: 65422
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