[PATCH] tests: fix doctests for pypy optimizations

Sean Farley sean at farley.io
Thu Mar 31 16:52:12 EDT 2016


Maciej Fijalkowski <fijall at gmail.com> writes:

> # HG changeset patch
> # User Maciej Fijalkowski <fijall at gmail.com>
> # Date 1459442288 -7200
> #      Thu Mar 31 18:38:08 2016 +0200
> # Node ID 9ca7854b963295b8b56d276b903623ac8277f18d
> # Parent  eaaeff1b98571b90ec71614c75126e64e98c004b
> tests: fix doctests for pypy optimizations
>
> PyPy would sometime call __len__ at points where it things preallocating
> the container makes sense. Change the doctests so they're using generator
> expressions and not list comprehensions

Seems good to me. Might be worth it to add a comment explaining why, but
I think a reviewer could add that in-flight.


More information about the Mercurial-devel mailing list