Skip to content

Commit e731468

Browse files
committed
TEST: Test known ANTs version strings for correct parsed version
1 parent fd729e3 commit e731468

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from nipype.interfaces.ants.base import Info
2+
3+
import pytest
4+
5+
# fmt: off
6+
ANTS_VERSIONS = [("""\
7+
ANTs Version: 2.3.3.dev168-g29bdf
8+
Compiled: Jun 9 2020 03:44:55
9+
10+
""", "2.3.3"), ("""\
11+
ANTs Version: v2.3.5.post76-g28dd25c
12+
Compiled: Nov 16 2021 14:57:48
13+
14+
""", "2.3.5"), ("""\
15+
ANTs Version: v2.1.0.post789-g0740f
16+
Compiled: I don't still have this so not going to pretend
17+
18+
""", "2.2.0"),
19+
]
20+
# fmt: on
21+
22+
23+
@pytest.mark.parametrize("raw_info, version", ANTS_VERSIONS)
24+
def test_version_parser(raw_info, version):
25+
assert Info.parse_version(raw_info) == version

0 commit comments

Comments
 (0)