diff options
author | David Linke <dalito@users.noreply.github.com> | 2014-06-18 00:40:17 +0200 |
---|---|---|
committer | David Linke <dalito@users.noreply.github.com> | 2014-06-18 00:40:17 +0200 |
commit | 70c5b1396ba972a5b3fdef6146c52cae2abf3ece (patch) | |
tree | 059a462299c16fa2092a42ad249aa91bde8c872e | |
parent | fb131b3ed997ccf2802819d799b01adafba5b9b6 (diff) | |
download | pint-70c5b1396ba972a5b3fdef6146c52cae2abf3ece.tar.gz |
Move one test that fails in numpy < 1.8.0 to expected failure.
-rw-r--r-- | pint/testsuite/test_numpy.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pint/testsuite/test_numpy.py b/pint/testsuite/test_numpy.py index 14b7786..33ecdfc 100644 --- a/pint/testsuite/test_numpy.py +++ b/pint/testsuite/test_numpy.py @@ -402,9 +402,6 @@ class TestNDArrayQunatityMath(QuantityTestCase): q_cp = copy.copy(q) self.assertRaises(DimensionalityError, op_, 2., q_cp) arr_cp = copy.copy(arr) - q_cp = copy.copy(q) - # this fails for op.ipow ! (--> next test)) - self.assertRaises(DimensionalityError, op.pow, arr_cp, q_cp) arr_cp = copy.copy(arr) q_cp = copy.copy(q) self.assertRaises(DimensionalityError, op_, q_cp, arr_cp) @@ -420,6 +417,11 @@ class TestNDArrayQunatityMath(QuantityTestCase): q = self.Q_(copy.copy(arr), 'meter') arr_cp = copy.copy(arr) q_cp = copy.copy(q) - # q_cp is treated as if it is an array. The units are completely ignored + # this fails as expected since numpy 1.8.0 but... + self.assertRaises(DimensionalityError, op.pow, arr_cp, q_cp) + # ..not for op.ipow ! + # q_cp is treated as if it is an array. The units are ignored. # _Quantity.__ipow__ is never called + arr_cp = copy.copy(arr) + q_cp = copy.copy(q) self.assertRaises(DimensionalityError, op.ipow, arr_cp, q_cp) |