Skip to content

Commit 36c8841

Browse files
committed
🚚 move the tests to within the individual package dirs as @test
1 parent a0e9fdf commit 36c8841

File tree

169 files changed

+64
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+64
-30
lines changed

β€Žsrc/_numtype/@test/.ruff.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extend = "../.ruff.toml"
2+
3+
[lint]
4+
extend-ignore = [
5+
"PYI015", # flake8-pyi: assignment-default-in-stub
6+
"PYI017", # flake8-pyi: complex-assignment-in-stub
7+
]

β€Žtest/static/test__numtype.pyi renamed to β€Žsrc/_numtype/@test/test__numtype.pyi

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,6 @@ O_3d: list[list[list[object]]]
5050
nested_bool_1d: _nt.Sequence1ND[bool] = b_1d
5151
nested_bool_2d: _nt.Sequence1ND[bool] = b_2d
5252

53-
###
54-
# _ToArray1_0d
55-
56-
can_b1_0d: _nt.CanArray0D[np.bool] = np.bool()
57-
can_i1_0d: _nt.CanArray0D[np.int8] = np.int8()
58-
can_i2_0d: _nt.CanArray0D[np.int16] = np.int16()
59-
can_i4_0d: _nt.CanArray0D[np.int32] = np.int32()
60-
can_i8_0d: _nt.CanArray0D[np.int64] = np.int64()
61-
can_u1_0d: _nt.CanArray0D[np.uint8] = np.uint8()
62-
can_u2_0d: _nt.CanArray0D[np.uint16] = np.uint16()
63-
can_u4_0d: _nt.CanArray0D[np.uint32] = np.uint32()
64-
can_u8_0d: _nt.CanArray0D[np.uint64] = np.uint64()
65-
can_f2_0d: _nt.CanArray0D[np.float16] = np.float16()
66-
can_f4_0d: _nt.CanArray0D[np.float32] = np.float32()
67-
can_f8_0d: _nt.CanArray0D[np.float64] = np.float64()
68-
can_ld_0d: _nt.CanArray0D[np.longdouble] = np.longdouble()
69-
can_c8_0d: _nt.CanArray0D[np.complex64] = np.complex64()
70-
can_c16_0d: _nt.CanArray0D[np.complex128] = np.complex128()
71-
can_cld_0d: _nt.CanArray0D[np.clongdouble] = np.clongdouble()
72-
can_O_0d: _nt.CanArray0D[np.object_] = np.empty((), np.object_)
73-
can_M_0d: _nt.CanArray0D[np.datetime64] = np.datetime64(None)
74-
can_m_0d: _nt.CanArray0D[np.timedelta64] = np.timedelta64(None)
75-
can_S_0d: _nt.CanArray0D[np.bytes_] = np.bytes_(b"")
76-
can_U_0d: _nt.CanArray0D[np.str_] = np.str_("")
77-
can_V_0d: _nt.CanArray0D[np.void] = np.void(b"")
78-
7953
###
8054
# bool
8155

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import _numtype as _nt
2+
import numpy as np
3+
4+
###
5+
# _ToArray1_0d
6+
7+
can_b1_0d: _nt.CanArray0D[np.bool] = np.bool()
8+
can_i1_0d: _nt.CanArray0D[np.int8] = np.int8()
9+
can_i2_0d: _nt.CanArray0D[np.int16] = np.int16()
10+
can_i4_0d: _nt.CanArray0D[np.int32] = np.int32()
11+
can_i8_0d: _nt.CanArray0D[np.int64] = np.int64()
12+
can_u1_0d: _nt.CanArray0D[np.uint8] = np.uint8()
13+
can_u2_0d: _nt.CanArray0D[np.uint16] = np.uint16()
14+
can_u4_0d: _nt.CanArray0D[np.uint32] = np.uint32()
15+
can_u8_0d: _nt.CanArray0D[np.uint64] = np.uint64()
16+
can_f2_0d: _nt.CanArray0D[np.float16] = np.float16()
17+
can_f4_0d: _nt.CanArray0D[np.float32] = np.float32()
18+
can_f8_0d: _nt.CanArray0D[np.float64] = np.float64()
19+
can_ld_0d: _nt.CanArray0D[np.longdouble] = np.longdouble()
20+
can_c8_0d: _nt.CanArray0D[np.complex64] = np.complex64()
21+
can_c16_0d: _nt.CanArray0D[np.complex128] = np.complex128()
22+
can_cld_0d: _nt.CanArray0D[np.clongdouble] = np.clongdouble()
23+
can_O_0d: _nt.CanArray0D[np.object_] = np.empty((), np.object_)
24+
can_M_0d: _nt.CanArray0D[np.datetime64] = np.datetime64(None)
25+
can_m_0d: _nt.CanArray0D[np.timedelta64] = np.timedelta64(None)
26+
can_S_0d: _nt.CanArray0D[np.bytes_] = np.bytes_(b"")
27+
can_U_0d: _nt.CanArray0D[np.str_] = np.str_("")
28+
can_V_0d: _nt.CanArray0D[np.void] = np.void(b"")
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import _numtype as _nt
2+
3+
class A: ...
4+
5+
a0d: A
6+
a1d: list[A]
7+
a2d: list[list[A]]
8+
a3d: list[list[list[A]]]
9+
a4d: list[list[list[list[A]]]]
10+
11+
###
12+
13+
a1nd__a_0d: _nt.Sequence1ND[A] = a0d # type: ignore[assignment] # pyright: ignore[reportAssignmentType]
14+
a1nd__a_1d: _nt.Sequence1ND[A] = a1d
15+
a1nd__a_2d: _nt.Sequence1ND[A] = a2d
16+
a1nd__a_3d: _nt.Sequence1ND[A] = a3d
17+
a1nd__a_4d: _nt.Sequence1ND[A] = a4d

β€Žtest/.ruff.toml renamed to β€Žsrc/numpy-stubs/@test/.ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extend = "../pyproject.toml"
1+
extend = "../../../pyproject.toml"
22
line-length = 88
33

44
[lint]

β€Žtest/README.md renamed to β€Žsrc/numpy-stubs/@test/README.md

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
Β (0)