Commit 8105c0e
committed
test(echodata): add tests for ECS, local storage, cal_params; fix stale tests
- New test_ecs.py: 18 tests covering _normalize_ecs_text header rewriting,
_coerce_to_path input handling, parse_ecs with mocked echopype,
build_cal_params_from_ecs single/dual-pulse and error cases
- New TestLocalStorage in test_storage.py: 14 tests for use_local_storage
toggle, env var fallback, get_azure_zarr_store/get_zarr_store_uri in
local mode, save+open roundtrip, ensure_container_exists,
upload_file_to_blob, _LocalListFS, module exports
- New cal_params forwarding tests in test_compute.py: verify
compute_sv_from_echodata forwards cal_params/env_params to compute_Sv
and omits None values from kwargs
- Fix test_calibrate.py: remove tests for deleted parse_ecs_file and
parse_json_calibration; add tests for .ecs ValueError, JSON loading,
TypeError on bad input, auto-detect failure
- Fix test_config.py: update attenuation_threshold assertion from 0.8
to 6.0 matching current DenoiseConfig defaults (Ryan et al. 2015)
- Fix test_compute.py: replace module-level pytest.importorskip(echopype)
with class-level @skipif so non-echopype tests are no longer skipped1 parent 8ddb31f commit 8105c0e
5 files changed
Lines changed: 669 additions & 46 deletions
File tree
- oceanstream/tests/unit/echodata
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
152 | 164 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 165 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 166 | + | |
175 | 167 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
180 | 173 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
191 | 177 | | |
192 | 178 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
103 | 167 | | |
104 | 168 | | |
105 | 169 | | |
| |||
308 | 372 | | |
309 | 373 | | |
310 | 374 | | |
| 375 | + | |
311 | 376 | | |
312 | 377 | | |
313 | | - | |
314 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
315 | 388 | | |
316 | 389 | | |
317 | 390 | | |
| |||
371 | 444 | | |
372 | 445 | | |
373 | 446 | | |
| 447 | + | |
374 | 448 | | |
375 | 449 | | |
376 | 450 | | |
| |||
414 | 488 | | |
415 | 489 | | |
416 | 490 | | |
| 491 | + | |
417 | 492 | | |
418 | 493 | | |
419 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| |||
0 commit comments