提交 4a81e8bd authored 作者: Frederic's avatar Frederic

Old test checked that something should not work, but it was a bug. Is should have been working.

Now test correctly what should not work as the functionality was implemented by PL.
上级 560ad497
...@@ -2441,10 +2441,14 @@ class T_subtensor(unittest.TestCase, utt.TestOptimizationMixin): ...@@ -2441,10 +2441,14 @@ class T_subtensor(unittest.TestCase, utt.TestOptimizationMixin):
n = self.shared(numpy.asarray(5, dtype=self.dtype)) n = self.shared(numpy.asarray(5, dtype=self.dtype))
self.assertRaises(TypeError, n.__getitem__, [0,0]) self.assertRaises(TypeError, n.__getitem__, [0,0])
def test_err_invalid_2list(self): def test_err_invalid_not_2d(self):
# TODO the error message is not clear n = self.shared(numpy.ones((3, 3, 3), dtype=self.dtype) * 5)
n = self.shared(numpy.ones((3,3), dtype=self.dtype)*5) self.assertRaises(NotImplementedError, n.__getitem__,
self.assertRaises(TypeError, n.__getitem__, ([0,0],[1,1])) ([0, 0, 0], [1, 1, 1], [2, 2, 2]))
def test_err_invalid_2list_dtype(self):
n = self.shared(numpy.ones((3, 3), dtype=self.dtype) * 5)
self.assertRaises(TypeError, n.__getitem__, ([0., 0], [1, 1]))
def test_err_bound_list(self): def test_err_bound_list(self):
n = self.shared(numpy.ones((2,3),dtype=self.dtype)*5) n = self.shared(numpy.ones((2,3),dtype=self.dtype)*5)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论