Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #3311, which lists the tables that I worked off to write this function. We now guess strategies for 16,758,972 (8.43%) of 198,892,807 total arguments - excluding the staggeringly common (96,322,728)
self
argument which Hypothesis should never need to generate.I actually feel pretty good about this: almost nine percent of all arguments is a pretty big win, and I think that the table below shows these are "reasonable guesses" that users will understand, even if they're not correct in all cases.
Table of all most-common arguments, with guessed strategy (if any)
4,664,756
2.345%
4,596,739
2.311%
4,563,483
2.294%
3,151,117
1.584%
2,926,485
1.471%
text()
2,223,895
1.118%
2,050,786
1.031%
2,029,481
1.020%
1,286,368
0.647%
1,278,266
0.643%
1,207,603
0.607%
1,006,548
0.506%
1,003,916
0.505%
929,057
0.467%
912,238
0.459%
908,079
0.457%
895,788
0.450%
895,318
0.450%
741,960
0.373%
text()
733,713
0.369%
717,788
0.361%
678,857
0.341%
677,090
0.340%
675,795
0.340%
675,146
0.339%
663,252
0.333%
598,919
0.301%
578,324
0.291%
564,599
0.284%
563,671
0.283%
558,044
0.281%
549,195
0.276%
543,882
0.273%
541,838
0.272%
539,693
0.271%
527,525
0.265%
520,962
0.262%
513,047
0.258%
477,787
0.240%
446,851
0.225%
431,930
0.217%
431,350
0.217%
functions()
424,984
0.214%
418,743
0.211%
integers(min_value=0)
413,990
0.208%
408,645
0.205%
397,115
0.200%
350,064
0.176%
349,529
0.176%
348,631
0.175%
344,892
0.173%
344,852
0.173%
344,795
0.173%
functions()
332,927
0.167%
text()
329,775
0.166%
text()
325,912
0.164%
315,071
0.158%
310,998
0.156%
305,727
0.154%
302,511
0.152%
297,263
0.149%
294,788
0.148%
294,355
0.148%
282,259
0.142%
280,268
0.141%
280,258
0.141%
277,550
0.140%
276,692
0.139%
275,802
0.139%
integers(min_value=0)
270,071
0.136%
269,314
0.135%
268,473
0.135%
265,529
0.134%
264,066
0.133%
257,981
0.130%
255,301
0.128%
254,866
0.128%
integers(0, 65535)
253,914
0.128%
251,358
0.126%
250,846
0.126%
booleans()
245,455
0.123%
integers(min_value=0)
243,400
0.122%
text()
240,966
0.121%
integers() | floats()
239,292
0.120%
237,002
0.119%
236,537
0.119%
236,211
0.119%
text()
233,390
0.117%
domains()
230,365
0.116%
227,374
0.114%
226,652
0.114%
218,205
0.110%
213,738
0.107%
210,613
0.106%
210,299
0.106%
208,098
0.105%
206,760
0.104%
204,716
0.103%
204,611
0.103%
203,809
0.102%
201,099
0.101%
lists(text())
200,388
0.101%
200,024
0.101%