-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'vara-dev' into f-UpdateReports
- Loading branch information
Showing
4 changed files
with
167 additions
and
11 deletions.
There are no files selected for viewing
Empty file.
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,34 @@ | ||
"""Test revision helper functions.""" | ||
|
||
import unittest | ||
|
||
from tests.helper_utils import run_in_test_environment, UnitTestFixtures | ||
from varats.paper.paper_config import load_paper_config | ||
from varats.revision.revisions import get_processed_revisions_files | ||
from varats.utils.settings import vara_cfg | ||
|
||
|
||
class TestGetProcessedRevisionsFiles(unittest.TestCase): | ||
"""Test if the revision look up works correctly.""" | ||
|
||
@run_in_test_environment( | ||
UnitTestFixtures.PAPER_CONFIGS, UnitTestFixtures.RESULT_FILES | ||
) | ||
def test_config_specific_lookup(self) -> None: | ||
"""Check whether the config specific file loading works.""" | ||
vara_cfg()['paper_config']['current_config'] = "test_config_ids" | ||
load_paper_config() | ||
|
||
processed_rev_files_cid_1 = get_processed_revisions_files( | ||
"SynthSAContextSensitivity", config_id=1 | ||
) | ||
self.assertEqual(len(processed_rev_files_cid_1), 1) | ||
self.assertEqual( | ||
processed_rev_files_cid_1[0].report_filename.config_id, 1 | ||
) | ||
|
||
processed_rev_files_cid_2 = get_processed_revisions_files( | ||
"SynthSAContextSensitivity", config_id=2 | ||
) | ||
# there should not be a report for config id 2 | ||
self.assertEqual(len(processed_rev_files_cid_2), 0) |
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