Commit 02df8dd
refactor: split structures tests into granular focused tests
Split monolithic test functions in the arrays and grids test files into
individual focused tests. Each test now has a name that encodes the input
condition and expected outcome, so failures identify the exact scenario.
Applied @pytest.mark.parametrize where the same logic runs over multiple
equivalent inputs (resize shapes, kernel sizes for pad/trim).
Changes per file:
- test_uniform_1d.py (arrays): 8 tests → 14 tests; from_fits and header
tests split by file size; recursive_shape_storage split by mask presence
- test_uniform_2d.py (arrays): 17 tests → 33 tests; constructor split into
4 cases; resized_from parametrized over 2 shapes; padded/trimmed_from
parametrized over kernel sizes; binned and brightest tests split by scenario
- test_uniform_1d.py (grids): 8 tests → 12 tests; constructor, no_mask,
from_mask, uniform, uniform_from_zero, and grid_2d_radial split
- test_uniform_2d.py (grids): 21 tests → 24 tests; constructor exception
split into too-many/too-few; no_mask and uniform split by scenario;
bounding_box tests split with/without buffer variant
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 0eefe0c commit 02df8dd
File tree
4 files changed
+197
-104
lines changed- test_autoarray/structures
- arrays
- grids
4 files changed
+197
-104
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | | - | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
116 | 123 | | |
117 | 124 | | |
118 | 125 | | |
| |||
125 | 132 | | |
126 | 133 | | |
127 | 134 | | |
128 | | - | |
| 135 | + | |
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
| |||
135 | 142 | | |
136 | 143 | | |
137 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
138 | 151 | | |
139 | 152 | | |
140 | 153 | | |
| |||
145 | 158 | | |
146 | 159 | | |
147 | 160 | | |
148 | | - | |
| 161 | + | |
149 | 162 | | |
150 | 163 | | |
151 | 164 | | |
| |||
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
172 | | - | |
| 185 | + | |
173 | 186 | | |
174 | 187 | | |
175 | 188 | | |
176 | 189 | | |
177 | 190 | | |
| 191 | + | |
| 192 | + | |
178 | 193 | | |
179 | 194 | | |
180 | 195 | | |
| |||
0 commit comments