[PATCH] tests: fix builtin module test on pypy

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 30 15:34:54 EDT 2016



On 03/30/2016 12:32 PM, Maciej Fijalkowski wrote:
> # HG changeset patch
> # User fijal
> # Date 1459366305 -7200
> #      Wed Mar 30 21:31:45 2016 +0200
> # Node ID 6057e466307e7b9563e251043943880a15dbd84c
> # Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
> 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 -r ff0d3b6b287f -r 6057e466307e contrib/import-checker.py
> --- a/contrib/import-checker.py	Tue Mar 29 12:29:00 2016 -0500
> +++ b/contrib/import-checker.py	Wed Mar 30 21:31:45 2016 +0200
> @@ -182,6 +182,8 @@
>       yield 'builtins' # python3 only
>       for m in 'fcntl', 'grp', 'pwd', 'termios':  # Unix only
>           yield m
> +    for m in 'cPickle', 'datetime':
> +        yield m

The for above have a small comment explaining why these value make 
sense, Can you add the same thing for the pypy on?

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list