Repository navigation
Commit 6ed587d
committed
Accept numeric strings for verbosity options in native TOML again
pytest-dev#15153 registered the verbosity_* options as `int | Literal["auto"]`.
In native TOML mode neither member accepts a numeric string, so
`verbosity_assertions = "2"` raised a UsageError, although the changelog
promised strings keep working.
Register them as `int | str` (like tmp_path_retention_count) and validate
the string in `Config.get_verbosity`, which now raises a UsageError naming
the option for values that are neither an int nor "auto".
Fixes pytest-dev#15290.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent a7b2446 commit 6ed587d
3 files changed
Lines changed: 23 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2268 | 2268 | | |
2269 | 2269 | | |
2270 | 2270 | | |
2271 | | - | |
2272 | | - | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
2273 | 2280 | | |
2274 | 2281 | | |
2275 | 2282 | | |
| |||
2289 | 2296 | | |
2290 | 2297 | | |
2291 | 2298 | | |
2292 | | - | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
2293 | 2302 | | |
2294 | 2303 | | |
2295 | 2304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3630 | 3630 | | |
3631 | 3631 | | |
3632 | 3632 | | |
3633 | | - | |
3634 | 3633 | | |
3635 | 3634 | | |
3636 | 3635 | | |
| |||
3641 | 3640 | | |
3642 | 3641 | | |
3643 | 3642 | | |
3644 | | - | |
3645 | | - | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
3646 | 3646 | | |
3647 | 3647 | | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
0 commit comments