Commit bd9317b
committed
A boolean is not a rate, and an oversized int is not a different error
YAML reads `yes` and `on` as True and `float(True)` is 1.0, so
`sampling_rate: yes` became 1 Hz instead of 100 with nothing said. The previous
revision of the test file pinned that as the contract, which is worse than
leaving it unspecified. Refused now, the same way a boolean is already refused
as a range endpoint.
`float(10**400)` raises OverflowError, so one argument in the same validator
came back as a different exception type from everything beside it.
126 tests, up from 122.
Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>1 parent 2fa75e6 commit bd9317b
2 files changed
Lines changed: 30 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | | - | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
| 800 | + | |
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
804 | | - | |
805 | | - | |
806 | 804 | | |
807 | 805 | | |
808 | 806 | | |
| |||
866 | 864 | | |
867 | 865 | | |
868 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
0 commit comments