We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bd47fa8 + a1c6435 commit c0b8fcfCopy full SHA for c0b8fcf
1 file changed
tests/scancode/test_cli.py
@@ -730,7 +730,12 @@ def test_scan_errors_out_with_unknown_option():
730
test_file = test_env.get_test_loc('license_text/test.txt')
731
args = ['--json--info', test_file]
732
result = run_scan_click(args, expected_rc=2)
733
- assert 'Error: No such option: --json--info'.lower() in result.output.lower()
+ # Accept both the old and new click error message formats:
734
+ # click < 8.2: "Error: No such option: --json--info"
735
+ # click >= 8.2: "Error: No such option '--json--info'. (Did you mean ...)"
736
+ output = result.output.lower()
737
+ assert 'no such option' in output
738
+ assert '--json--info' in output
739
740
741
def test_scan_to_json_without_FILE_does_not_write_to_next_option():
0 commit comments