Skip to content

Commit a475f09

Browse files
committed
Add third party tests
1 parent cd8a9ff commit a475f09

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

tests/third_party/cupy/io_tests/__init__.py

Whitespace-only changes.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import pytest
2+
3+
from tests.third_party.cupy import testing
4+
5+
6+
class TestBinaryRepr(testing.NumpyAliasBasicTestBase):
7+
8+
func = "binary_repr"
9+
10+
11+
@testing.parameterize(
12+
*testing.product(
13+
{
14+
"args": [
15+
(0,),
16+
(3,),
17+
(-3,),
18+
(0, 0),
19+
(3, 5),
20+
(-3, 5),
21+
# TODO(unno): Insuffisicent width is deprecated in numpy>=1.13.
22+
# We need to check if it cause a warning, and maybe it causes an
23+
# error in the future.
24+
# (3, 0),
25+
# (-3, 0),
26+
]
27+
}
28+
)
29+
)
30+
class TestBinaryReprValues(testing.NumpyAliasValuesTestBase):
31+
32+
func = "binary_repr"
33+
34+
35+
@pytest.mark.skip("base_repr() is not implemented")
36+
class TestBaseRepr(testing.NumpyAliasBasicTestBase):
37+
38+
func = "base_repr"
39+
40+
41+
@testing.parameterize(
42+
*testing.product(
43+
{
44+
"args": [
45+
(0,),
46+
(5,),
47+
(-5,),
48+
(0, 2),
49+
(0, 10),
50+
(0, 36),
51+
(5, 2),
52+
(5, 10),
53+
(5, 36),
54+
(-5, 2),
55+
(-5, 10),
56+
(-5, 36),
57+
(-5, 2, 0),
58+
(-5, 2, 2),
59+
(-5, 2, 10),
60+
(5, 2, 0),
61+
(5, 2, 2),
62+
(5, 2, 10),
63+
]
64+
}
65+
)
66+
)
67+
@pytest.mark.skip("base_repr() is not implemented")
68+
class TestBaseReprValues(testing.NumpyAliasValuesTestBase):
69+
70+
func = "base_repr"

0 commit comments

Comments
 (0)