提交 548f7f05 authored 作者: Tanjay94's avatar Tanjay94

Fixed test to catch old numpy version.

上级 ae2a43ca
......@@ -669,7 +669,8 @@ class T_NormTests(unittest.TestCase):
try:
numpy.linalg.norm([[2, 1], [3, 4]], None, None)
except "norm() takes at most 2 arguments (3 given)":
except TypeError, e:
assert "norm() takes at most 2 arguments (3 given)" in str(e)
raise SkipTest
for i in range(0, 14):
......@@ -678,6 +679,7 @@ class T_NormTests(unittest.TestCase):
n_n.append(numpy.linalg.norm(A[3][i], A[4][i], A[2][i]))
assert _allclose(n_n[i], t_n[i])
class T_lstsq(unittest.TestCase):
def test_correct_solution(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论