test_base_n.py 1.11 KB
Newer Older
root's avatar
root committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from cupy import testing


class TestBinaryRepr(testing.NumpyAliasBasicTestBase):

    func = 'binary_repr'


@testing.parameterize(
    *testing.product({
        'args': [
            (0,), (3,), (-3,),
            (0, 0),
            (3, 5),
            (-3, 5),
            # TODO(unno): Insuffisicent width is deprecated in numpy>=1.13.
            # We need to check if it cause a warning, and maybe it causes an
            # error in the future.
            # (3, 0),
            # (-3, 0),
        ]}))
class TestBinaryReprValues(testing.NumpyAliasValuesTestBase):

    func = 'binary_repr'


class TestBaseRepr(testing.NumpyAliasBasicTestBase):

    func = 'base_repr'


@testing.parameterize(
    *testing.product({
        'args': [
            (0,), (5,), (-5,),
            (0, 2), (0, 10), (0, 36),
            (5, 2), (5, 10), (5, 36),
            (-5, 2), (-5, 10), (-5, 36),
            (-5, 2, 0),
            (-5, 2, 2),
            (-5, 2, 10),
            (5, 2, 0),
            (5, 2, 2),
            (5, 2, 10),
        ]}))
class TestBaseReprValues(testing.NumpyAliasValuesTestBase):

    func = 'base_repr'