Skip to content

Commit

Permalink
Fixing empty test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dahlia-Chehata committed Jul 2, 2020
1 parent 98a33e3 commit 2b95b6d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/cupy_tests/statics_tests/test_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,19 @@ def test_correlate_diff_types(self, xp, dtype1, dtype2):
b = testing.shaped_arange((100,), xp, dtype2)
return xp.correlate(a, b, mode=self.mode)

@testing.for_all_dtypes()
@testing.numpy_cupy_equal()
def test_correlate_empty(self, xp, dtype):
a = xp.zeros((0,), dtype)
return xp.correlate(a, a, mode=self.mode)


@testing.gpu
@testing.parameterize(*testing.product({
'mode': ['valid', 'same', 'full']
}))
class TestCorrelateInvalid(unittest.TestCase):

@testing.for_all_dtypes()
def test_correlate_empty(self, dtype):
for xp in (numpy, cupy):
a = xp.zeros((0,), dtype)
with pytest.raises(ValueError):
xp.correlate(a, a, mode=self.mode)

@testing.for_all_dtypes()
def test_correlate_ndim(self, dtype):
for xp in (numpy, cupy):
Expand Down

0 comments on commit 2b95b6d

Please sign in to comment.