Skip to content

Commit 4c2fd46

Browse files
committed
TEST: Test fallback version
1 parent 389059e commit 4c2fd46

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

nibabel/tests/test_pkg_info.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
import nibabel as nib
55
from nibabel.pkg_info import cmp_pkg_version
6+
from ..info import VERSION
67

78
from nose.tools import (assert_raises, assert_equal)
89

910

1011
def test_pkg_info():
11-
"""Simple smoke test
12+
"""Smoke test nibabel.get_info()
1213
1314
Hits:
1415
- nibabel.get_info
@@ -23,6 +24,20 @@ def test_version():
2324
assert_equal(nib.pkg_info.__version__, nib.__version__)
2425

2526

27+
def test_fallback_version():
28+
"""Test fallback version is up-to-date
29+
30+
This should only fail if we fail to bump nibabel.info.VERSION immediately
31+
after release
32+
"""
33+
assert (
34+
# dev version should be larger than tag+commit-githash
35+
cmp_pkg_version(VERSION) >= 0 or
36+
# Allow VERSION bump to lag releases by one commit
37+
VERSION == nib.__version__ + 'dev'), \
38+
"nibabel.info.VERSION does not match current tag information"
39+
40+
2641
def test_cmp_pkg_version():
2742
# Test version comparator
2843
assert_equal(cmp_pkg_version(nib.__version__), 0)

0 commit comments

Comments
 (0)