summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-09-23 19:38:34 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-09-23 19:38:34 -0600
commit935c634e5665647187af8545cb94394f9ac9da82 (patch)
tree99ce378d8fd0fb035d00b96c0f8520691da5d572 /numpy/lib
parent32a6b4547f8f94e481f7d1a6e2656c9fa9c6c62e (diff)
downloadnumpy-935c634e5665647187af8545cb94394f9ac9da82.tar.gz
TST: Update test__version.py.
Added tests for the x.x.dev0+1234567 form together with alpha and beta versions of same. Updates lifted from scipy.
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/tests/test__version.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/lib/tests/test__version.py b/numpy/lib/tests/test__version.py
index bbafe68eb..993c9d507 100644
--- a/numpy/lib/tests/test__version.py
+++ b/numpy/lib/tests/test__version.py
@@ -48,6 +48,19 @@ def test_dev_a_b_rc_mixed():
assert_(NumpyVersion('1.9.0a2.dev-6acvda54') < '1.9.0a2')
+def test_dev0_version():
+ assert_(NumpyVersion('1.9.0.dev0+Unknown') < '1.9.0')
+ for ver in ['1.9.0', '1.9.0a1', '1.9.0b2', '1.9.0b2.dev0+ffffffff']:
+ assert_(NumpyVersion('1.9.0.dev0+f16acvda') < ver)
+
+ assert_(NumpyVersion('1.9.0.dev0+f16acvda') == '1.9.0.dev0+11111111')
+
+
+def test_dev0_a_b_rc_mixed():
+ assert_(NumpyVersion('1.9.0a2.dev0+f16acvda') == '1.9.0a2.dev0+11111111')
+ assert_(NumpyVersion('1.9.0a2.dev0+6acvda54') < '1.9.0a2')
+
+
def test_raises():
for ver in ['1.9', '1,9.0', '1.7.x']:
assert_raises(ValueError, NumpyVersion, ver)