Skip to content

Commit

Permalink
resources test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoFrhwld committed May 14, 2024
1 parent ae0ab39 commit 1611171
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions tests/test_utils/test_resources.py
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()

0 comments on commit 1611171

Please sign in to comment.