Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff88b06

Browse files
Merge pull request #4106 from alok1304/add-test-false-positive-gpl3
Add test for false positive GPL3 license
2 parents 1015922 + 5dd3418 commit ff88b06

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.chip = {
2+
.base = S5PC100_GPL1(0),
3+
.ngpio = S5PC100_GPIO_L1_NR,
4+
.label = "GPL1",
5+
},
6+
}, {
7+
.chip = {
8+
.base = S5PC100_GPL2(0),
9+
.ngpio = S5PC100_GPIO_L2_NR,
10+
.label = "GPL2",
11+
},
12+
}, {
13+
.chip = {
14+
.base = S5PC100_GPL3(0),
15+
.ngpio = S5PC100_GPIO_L3_NR,
16+
.label = "GPL3",
17+
},

tests/licensedcode/test_detect.py

+7
Original file line numberDiff line numberDiff line change
@@ -1325,3 +1325,10 @@ def test_detection_return_correct_mit_not_apache_using_full_index(self):
13251325
matches = idx.match(location=query_location)
13261326
results = [m.rule.license_expression for m in matches]
13271327
assert results == expected
1328+
1329+
def test_detection_returns_correct_no_gpl3_false_positive(self):
1330+
idx = cache.get_index()
1331+
query_location = self.get_test_loc('false_positive/false-positive-gpl3.txt')
1332+
matches = idx.match(location=query_location)
1333+
assert not matches
1334+

0 commit comments

Comments
 (0)