Skip to content

Commit 6445acc

Browse files
committed
using pytest skipif
1 parent bed545f commit 6445acc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nipype/tests/test_nipype.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from .. import get_info
22
from ..info import get_nipype_gitversion
3+
import pytest
34

45

56
def test_nipype_info():
@@ -11,7 +12,8 @@ def test_nipype_info():
1112
assert exception_not_raised
1213

1314

15+
@pytest.mark.skipif(not get_nipype_gitversion(),
16+
reason="not able to get version from get_nipype_gitversion")
1417
def test_git_hash():
15-
if get_nipype_gitversion():
16-
# removing the first "g" from gitversion
17-
get_nipype_gitversion()[1:] == get_info()['commit_hash']
18+
# removing the first "g" from gitversion
19+
get_nipype_gitversion()[1:] == get_info()['commit_hash']

0 commit comments

Comments
 (0)