Skip to content

Commit e1fb595

Browse files
authored
Merge pull request #1962 from effigies/bug/fsversion
FIX: Restore FSVersion to string
2 parents e89436c + 9b2a444 commit e1fb595

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Keeping this to avoid breaking external programs that depend on it, but
4040
# this should not be used internally
41-
FSVersion = Info.looseversion()
41+
FSVersion = Info.looseversion().vstring
4242

4343

4444
class ParseDICOMDirInputSpec(FSTraitedSpec):

nipype/interfaces/freesurfer/tests/test_preprocess.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33
# vi: set ft=python sts=4 ts=4 sw=4 et:
4+
from builtins import str
45
import os
56

67
import pytest
@@ -154,3 +155,9 @@ def test_bbregister(create_files_in_directory):
154155
'--reg {base}_bbreg_fsaverage.dat '
155156
'--mov {full} --s fsaverage'.format(
156157
full=filelist[0], base=base))
158+
159+
def test_FSVersion():
160+
"""Check that FSVersion is a string that can be compared with LooseVersion
161+
"""
162+
assert isinstance(freesurfer.preprocess.FSVersion, str)
163+
assert LooseVersion(freesurfer.preprocess.FSVersion) >= LooseVersion("0")

0 commit comments

Comments
 (0)