Commit a1c6435
committed
Make 'no such option' assertion tolerant of newer click error format
click >= 8.2 changed the unknown-option error message from
'Error: No such option: --foo'
to
'Error: No such option '--foo'. (Did you mean ...)'
This broke tests/scancode/test_cli.py::test_scan_errors_out_with_unknown_option
on the *_latest_from_pip CI matrix (ubuntu22/24, macos14, win2019/2022).
Relax the assertion to check for the stable substrings ('no such option'
and the offending option name) instead of the exact phrasing, so the
test works with both click < 8.2 and click >= 8.2.
Signed-off-by: Guillem Serra Cazorla <guillem@meta.com>1 parent 6570c13 commit a1c6435
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
733 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
734 | 739 | | |
735 | 740 | | |
736 | 741 | | |
| |||
0 commit comments