Skip to content

Commit 7a2160d

Browse files
committed
ENH(TST): basic tests for loading heuristic descriptions
1 parent e18b241 commit 7a2160d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/test_utils.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import os
2+
from heudiconv.utils import (
3+
get_known_heuristics_with_descriptions,
4+
get_heuristic_description
5+
)
6+
7+
8+
def test_get_known_heuristics_with_descriptions():
9+
d = get_known_heuristics_with_descriptions()
10+
assert {'reproin', 'convertall'}.issubset(d)
11+
# ATM we include all, not only those two
12+
assert len(d) > 2
13+
assert len(d['reproin']) > 50 # it has a good one
14+
assert len(d['reproin'].split(os.sep)) == 1 # but just one line
15+
16+
17+
def test_get_heuristic_description():
18+
desc = get_heuristic_description('reproin', full=True)
19+
assert len(desc) > 1000
20+
# and we describe such details as
21+
assert '_ses-' in desc
22+
assert '_run-' in desc
23+
# and mention ReproNim ;)
24+
assert 'ReproNim' in desc

0 commit comments

Comments
 (0)