Skip to content

Commit 38e81bb

Browse files
committed
TST: delete tests that assume warings.catch_warnings is thread-safe
1 parent 23680c9 commit 38e81bb

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

numpy/_core/tests/test_nep50_promotions.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,18 +352,11 @@ def legacy_no_warn():
352352
np._set_promotion_state("legacy")
353353
b.wait()
354354
assert np._get_promotion_state() == "legacy"
355-
# turn warnings into errors, this should not warn with
356-
# legacy promotion state
357-
with warnings.catch_warnings():
358-
warnings.simplefilter("error")
359-
np.float16(1) + 131008
360355

361356
def weak_warn():
362357
np._set_promotion_state("weak")
363358
b.wait()
364359
assert np._get_promotion_state() == "weak"
365-
with pytest.raises(RuntimeWarning):
366-
np.float16(1) + 131008
367360

368361
task1 = threading.Thread(target=legacy_no_warn)
369362
task2 = threading.Thread(target=weak_warn)

0 commit comments

Comments
 (0)