# HG changeset patch # User Maciej Fijalkowski # Date 2016-03-30 19:54:26 # Node ID 806d260c6f3b8b00dcda6696665f6fd55cdec320 # Parent 80e922479891794d15f45c925fa218cdcec9544c 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. diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -184,6 +184,8 @@ def list_stdlib_modules(): 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.