Example #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)
Example #2
0
 def test_inequality_numpy(self):
     self.xs[0] += 1
     with self.assertRaises(AssertionError):
         testing.assert_array_list_equal(self.xs, self.ys)
Example #3
0
 def test_equality_numpy(self):
     testing.assert_array_list_equal(self.xs, self.ys)
Example #4
0
 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)
Example #5
0
 def test_equality_numpy(self):
     testing.assert_array_list_equal(self.xs, self.ys)
Example #6
0
 def test_inequality_numpy(self):
     self.xs[0] += 1
     with self.assertRaises(AssertionError):
         testing.assert_array_list_equal(self.xs, self.ys)