Skip to content

Commit 0e002df

Browse files
committed
fix a couple tests on py3
1 parent 9bfc598 commit 0e002df

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

quantities/tests/test_umath.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from unittest import expectedFailure, skipIf
3-
42
import numpy as np
53

64
from .. import units as pq
@@ -43,7 +41,7 @@ def test_gradient(self):
4341
l = np.gradient([[1,1],[3,4]] * pq.J, 1 * pq.m)
4442
self.assertQuantityEqual(l[0], [[2., 3.], [2., 3.]] * pq.J/pq.m)
4543
self.assertQuantityEqual(l[1], [[0., 0.], [1., 1.]] * pq.J/pq.m)
46-
except ValueError, e:
44+
except ValueError as e:
4745
raise self.failureException(e)
4846

4947
def test_cross(self):
@@ -157,7 +155,7 @@ def test_fix(self):
157155
np.fix([2.1, 2.9, -2.1, -2.9] * pq.degF),
158156
[2., 2., -2., -2.] * pq.degF
159157
)
160-
except ValueError, e:
158+
except ValueError as e:
161159
raise self.failureException(e)
162160

163161
def test_exp(self):

0 commit comments

Comments
 (0)