-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
280 additions
and
1,401 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from typing import List | ||
|
||
from sflkit.analysis.analysis_type import AnalysisType | ||
from sflkit.analysis.spectra import Line | ||
from utils import BaseTest | ||
|
||
|
||
class TestCoverage(BaseTest): | ||
def test_coverage(self): | ||
analyzer = self.run_analysis( | ||
self.TEST_SUGGESTIONS, | ||
"line", | ||
"line", | ||
relevant=[["2", "1", "3"]], | ||
irrelevant=[["3", "2", "1"], ["3", "1", "2"]], | ||
) | ||
coverage: List[Line] = analyzer.get_coverage(AnalysisType.LINE) | ||
coverage = {line.line for line in coverage} | ||
self.assertEqual(coverage, {1, 5, 6, 7, 9, 10, 12, 13, 16, 19, 20}) |