Message393981
I do not want to dissuade you from figuring out how minithesis / hypothesis works (far from it), but I'm wondering if the question of how shrinking works is germane to the issue at hand, which is whether or not hypothesis / property-based-testing is suitable for testing the standard library.
I almost don't think it matters *if* shrinking works, much less *how*. Shrinking is something of a UI nicety in the sense that when hypothesis finds an example that violates a property, it will try to take whatever example it has chosen and find something like a "minimal working example" to show to the end user. So if we have something like:
```
@given(x=strategies.integers())
def f(x):
assert x >= 0
```
Hypothesis will presumably tell us that `x == -1` will violate the property instead of `-24948929` or some other random thing. But if it did report `-24948929` or something, it wouldn't be too hard to see "oh, right, integers can be negative". In some cases with the time zone stuff, there isn't a good metric for complexity at the moment, so time zones are sorted by their IANA key (which is to say, basically arbitrary), and I generally find it useful anyway (admittedly, the shrinking still is helpful because most problems affecting all zones will return Africa/Abuja, whereas things particular to a specific zone's odd time zone history will return whichever zone with that quirk comes alphabetically first).
Anyway, do not let me disrupt your process, I just thought it might be worth making the point that some of these specific details might be nice to know, but don't seem like they should be blockers for hypothesis' adoption in the standard library. |
|
Date |
User |
Action |
Args |
2021-05-19 22:11:51 | p-ganssle | set | recipients:
+ p-ganssle, gvanrossum, terry.reedy, Guido.van.Rossum, Zac Hatfield-Dodds |
2021-05-19 22:11:51 | p-ganssle | set | messageid: <1621462311.84.0.612524149871.issue42109@roundup.psfhosted.org> |
2021-05-19 22:11:51 | p-ganssle | link | issue42109 messages |
2021-05-19 22:11:51 | p-ganssle | create | |
|