Skip to content

Commit da1f564

Browse files
Changing the function name and checking result in test_check_output (#1047)
Co-authored-by: Alexander-Makaryev <[email protected]>
1 parent 6cab866 commit da1f564

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

tests/skipped_tests_gpu.tbl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ tests/test_mathematical.py::TestGradient::test_gradient_y1[array2]
88
tests/test_mathematical.py::TestGradient::test_gradient_y1_dx[2-array0]
99
tests/test_mathematical.py::TestGradient::test_gradient_y1_dx[2-array1]
1010
tests/test_mathematical.py::TestGradient::test_gradient_y1_dx[2-array2]
11-
tests/test_random.py::test_check_otput[random]
12-
tests/test_random.py::test_check_otput[random_sample]
13-
tests/test_random.py::test_check_otput[ranf]
14-
tests/test_random.py::test_check_otput[sample]
1511
tests/test_random.py::TestDistributionsMultinomial::test_check_sum
1612
tests/test_random.py::TestDistributionsMultinomial::test_moments
1713
tests/test_random.py::TestDistributionsMultinomial::test_seed

tests/test_random.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,15 @@ def test_input_shape(func):
8484
ids=['random', 'random_sample',
8585
'ranf', 'sample',
8686
'rand'])
87-
def test_check_otput(func):
87+
def test_check_output(func):
8888
shape = (10, 5)
8989
size = 10 * 5
9090
if func == dpnp.random.rand:
9191
res = func(size)
9292
else:
9393
res = func(shape)
94-
# assert numpy.all(res >= 0)
95-
# assert numpy.all(res < 1)
96-
res_as_numpy = dpnp.asnumpy(res)
97-
for i in range(res_as_numpy.size):
98-
assert res_as_numpy[i] >= 0.0
99-
assert res_as_numpy[i] < 1.0
94+
assert dpnp.all(res >= 0)
95+
assert dpnp.all(res < 1)
10096

10197

10298
@pytest.mark.parametrize("func",

0 commit comments

Comments
 (0)