Skip to content

Commit 579fcc2

Browse files
Update test_out_dtypes in TestDivide
1 parent d3e5136 commit 579fcc2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_mathematical.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,16 +1105,19 @@ def test_out_dtypes(self, dtype):
11051105
dp_array2 = dpnp.arange(size, dtype=dtype)
11061106

11071107
dp_out = dpnp.empty(size, dtype=dpnp.complex64)
1108+
check_dtype = True
11081109
if dtype != dpnp.complex64:
11091110
# dtype of out mismatches types of input arrays
11101111
with pytest.raises(TypeError):
11111112
dpnp.divide(dp_array1, dp_array2, out=dp_out)
11121113

11131114
# allocate new out with expected type
11141115
dp_out = dpnp.empty(size, dtype=dtype)
1116+
# Set check_dtype to False as dtype does not match
1117+
check_dtype = False
11151118

11161119
result = dpnp.divide(dp_array1, dp_array2, out=dp_out)
1117-
assert_dtype_allclose(result, expected)
1120+
assert_dtype_allclose(result, expected, check_type=check_dtype)
11181121

11191122
@pytest.mark.usefixtures("suppress_divide_invalid_numpy_warnings")
11201123
@pytest.mark.parametrize("dtype", get_float_complex_dtypes())

0 commit comments

Comments
 (0)