예제 #1
0
 def new_impl(self):
     target = 'cupy.core._fusion_trace.TraceImpl'
     with mock.patch(target, CreateMock(target)) as m:
         numpy_result = impl(self, numpy, m)
     with mock.patch(target, CreateMock(target)) as m:
         cupy_result = impl(self, cupy, m)
     testing.assert_array_list_equal(numpy_result, cupy_result)
예제 #2
0
파일: test_array.py 프로젝트: 2php/chainer
 def test_inequality_numpy(self):
     self.xs[0] += 1
     with self.assertRaises(AssertionError):
         testing.assert_array_list_equal(self.xs, self.ys)
예제 #3
0
파일: test_array.py 프로젝트: 2php/chainer
 def test_equality_numpy(self):
     testing.assert_array_list_equal(self.xs, self.ys)
예제 #4
0
파일: test_array.py 프로젝트: yuhc/ava-cupy
 def test_inequality_numpy(self):
     self.xs[0] += 1
     with six.assertRaisesRegex(self, AssertionError,
                                '^\nArrays are not equal'):
         testing.assert_array_list_equal(self.xs, self.ys)
예제 #5
0
파일: test_array.py 프로젝트: yuhc/ava-cupy
 def test_equality_numpy(self):
     testing.assert_array_list_equal(self.xs, self.ys)
예제 #6
0
 def test_inequality_numpy(self):
     self.xs[0] += 1
     with self.assertRaises(AssertionError):
         testing.assert_array_list_equal(self.xs, self.ys)