Commit bfa0c4c
Han Wang
test(pt_expt): make the tf32 warn-once test immune to global logging state
set_log_handles (run by any earlier test calling main(), e.g.
test_dp_freeze's dispatcher tests) sets the 'deepmd' logger's
propagate=False process-wide, which silently empties caplog.records
(caplog captures via a root-logger handler and relies on propagation),
failing test_enable_tf32_warns_once[True] in ordering-dependent runs.
Restore propagation with monkeypatch for the test's duration. Also move
TestNativeSpinErrorTranslation above the __main__ block.1 parent ea00029 commit bfa0c4c
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
288 | 295 | | |
289 | 296 | | |
290 | 297 | | |
| |||
301 | 308 | | |
302 | 309 | | |
303 | 310 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | 311 | | |
309 | 312 | | |
310 | 313 | | |
| |||
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
0 commit comments