File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
import nibabel as nib
5
5
from nibabel .pkg_info import cmp_pkg_version
6
+ from ..info import VERSION
6
7
7
8
from nose .tools import (assert_raises , assert_equal )
8
9
9
10
10
11
def test_pkg_info ():
11
- """Simple smoke test
12
+ """Smoke test nibabel.get_info()
12
13
13
14
Hits:
14
15
- nibabel.get_info
@@ -23,6 +24,20 @@ def test_version():
23
24
assert_equal (nib .pkg_info .__version__ , nib .__version__ )
24
25
25
26
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
+
26
41
def test_cmp_pkg_version ():
27
42
# Test version comparator
28
43
assert_equal (cmp_pkg_version (nib .__version__ ), 0 )
You can’t perform that action at this time.
0 commit comments