changeset 28713:806d260c6f3b

tests: fix builtin module test on pypy On pypy datetime and cProfile are modules written in Python, not in C. For the purpose of this test, just list them explicitely as builtins, which silences warnings about them being imported before stdlib modules.
author Maciej Fijalkowski <fijall@gmail.com>
date Wed, 30 Mar 2016 21:54:26 +0200
parents 80e922479891
children dac81729fea4
files contrib/import-checker.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/import-checker.py	Thu Mar 31 15:37:21 2016 +0800
+++ b/contrib/import-checker.py	Wed Mar 30 21:54:26 2016 +0200
@@ -184,6 +184,8 @@
     yield 'builtins' # python3 only
     for m in 'fcntl', 'grp', 'pwd', 'termios':  # Unix only
         yield m
+    for m in 'cPickle', 'datetime': # in Python (not C) on PyPy
+        yield m
     stdlib_prefixes = set([sys.prefix, sys.exec_prefix])
     # We need to supplement the list of prefixes for the search to work
     # when run from within a virtualenv.