1. Pypy
  2. Untitled project
  3. pypy

Branches

more_strategies

View source
more_strategies
  • Contributors
    1. Loading...
Author Commit Message Date Builds
250+ commits behind default.
Laurence Tratt
Remove some of the unlikely special cases. These don't do any harm, but they are unlikely to trigger very often. By common consensus, they're probably better off removed.
Laurence Tratt
Revert the sorted list experiment.
Laurence Tratt
Add IntegerListAscending strategy.
Laurence Tratt
Merge default.
Laurence Tratt
Remove pointless print statements. Presumably these are long forgotten debugging aids.
Laurence Tratt
Be more conservative about comparing floats within an integer list. Very large floats can have no representation as a machine integer on a 64 bit machine. Rather than encoding lots of clever logic, be simple and conservative: any float whose representation as an int compraes true to the original float can go through the fast path. Otherwise use the slow path.
Laurence Tratt
Collapse two identical cases. No functional change.
Laurence Tratt
Remove unnecessary double type-check.
Laurence Tratt
Treat floats in integer lists more carefully. Previously floats were all rounded off, which leads to incorrect semantics for any float with a fractional component. A float which, when converted to an integer, doesn't compare True to itself can never match against any integer, so simply bail out when such a float is encountered. Bug pointed out to Amaury Forgeot d'Arc.
Laurence Tratt
Provide fast paths in find for integer and float strategy lists. This patch affects "x in l" and "l.index(x)" where l is a list. It leaves the expected common path (searching for an integer in an integer list; for a float in a flaot list) unchanged. However, comparisons of other types are significantly sped up. In some cases, we can use the type of an object to immediately prove that it can't be in the list (e.g. a user object which doesn't override __eq__ can'…