-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
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,61 @@ | ||
from new_fave.utils.local_resources import recodes, \ | ||
parsers, \ | ||
measurements, \ | ||
fasttrack_config | ||
|
||
from fave_recode.labelset_parser import LabelSetParser | ||
from fave_recode.rule_classes import RuleSet | ||
from fave_measurement_point.heuristic import Heuristic | ||
|
||
from pathlib import Path | ||
|
||
|
||
def test_paths(): | ||
recodes_paths = [ | ||
Path(x) | ||
for x in recodes.values() | ||
] | ||
|
||
for p in recodes_paths: | ||
assert p.is_file() | ||
|
||
for p in recodes_paths: | ||
try: | ||
RuleSet(rule_path=p) | ||
assert True | ||
except: | ||
assert False | ||
|
||
parsers_paths = [ | ||
Path(x) | ||
for x in parsers.values() | ||
] | ||
|
||
for p in parsers_paths: | ||
assert p.is_file() | ||
|
||
for p in parsers_paths: | ||
try: | ||
LabelSetParser(parser_path=p) | ||
assert True | ||
except: | ||
assert False | ||
|
||
heuristic_paths = [ | ||
Path(p) | ||
for p in measurements.values() | ||
] | ||
|
||
for p in heuristic_paths: | ||
assert p.is_file() | ||
|
||
for p in heuristic_paths: | ||
try: | ||
Heuristic(heuristic_path=p) | ||
assert True | ||
except: | ||
assert False | ||
|
||
|
||
for p in fasttrack_config.values(): | ||
assert Path(p).is_file() |