Skip to content

Commit cfbe36b

Browse files
committed
add '2-aho` in matcher & remove 2-aho file test
1 parent 197b261 commit cfbe36b

File tree

4 files changed

+1
-117
lines changed

4 files changed

+1
-117
lines changed

src/licensedcode/detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ def is_correct_detection(license_matches):
10721072
]
10731073

10741074
return (
1075-
all(matcher in ("1-hash", "1-spdx-id") for matcher in matchers)
1075+
all(matcher in ("1-hash", "1-spdx-id", "2-aho") for matcher in matchers)
10761076
and all(is_match_coverage_perfect)
10771077
)
10781078

tests/licensedcode/data/plugin_license/extra-words/scan-extra-words-2-aho-license.expected.json

Lines changed: 0 additions & 70 deletions
This file was deleted.

tests/licensedcode/data/plugin_license/extra-words/scan-extra-words-2-aho-license/LICENSE

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/licensedcode/test_plugin_license_detection.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,6 @@ def test_license_match_unknown_clues_is_not_in_expression():
9393
check_json_scan(test_loc, result_file, regen=REGEN_TEST_FIXTURES)
9494

9595

96-
def test_license_match_extra_words_2_aho():
97-
test_dir = test_env.get_test_loc('plugin_license/extra-words/scan-extra-words-2-aho-license/', copy=True)
98-
result_file = test_env.get_temp_file('json')
99-
args = [
100-
'--license',
101-
'--license-text',
102-
'--license-text-diagnostics',
103-
'--license-diagnostics',
104-
'--strip-root',
105-
'--verbose',
106-
'--json', result_file,
107-
test_dir,
108-
]
109-
run_scan_click(args)
110-
test_loc = test_env.get_test_loc('plugin_license/extra-words/scan-extra-words-2-aho-license.expected.json')
111-
check_json_scan(test_loc, result_file, regen=REGEN_TEST_FIXTURES)
112-
113-
11496
def test_license_match_extra_words_3_seq():
11597
test_dir = test_env.get_test_loc('plugin_license/extra-words/scan-extra-words-3-seq-license/', copy=True)
11698
result_file = test_env.get_temp_file('json')

0 commit comments

Comments
 (0)