Skip to content

Commit

Permalink
add test for false positive GPL3 license
Browse files Browse the repository at this point in the history
Ref: #3932
  • Loading branch information
alok1304 committed Jan 19, 2025
1 parent 1250647 commit 482a798
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
S5PC100_GPL3(0)
13 changes: 13 additions & 0 deletions tests/licensedcode/test_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,3 +1311,16 @@ def test_detection_return_correct_mit_not_apache_using_full_index(self):
matches = idx.match(location=query_location)
results = [m.rule.license_expression for m in matches]
assert results == expected

def test_detection_returns_correct_no_gpl3_false_positive(self):

idx = cache.get_index()
expected = []

query_location = self.get_test_loc('false_positive/false-positive-gpl3.txt')
matches = idx.match(location=query_location)

results = [m.rule.license_expression for m in matches]

assert results == expected

0 comments on commit 482a798

Please sign in to comment.