Skip to content

Commit 82b5654

Browse files
authored
change from deprecated pytest method of checking no warnings raised (#301)
1 parent f9fb12e commit 82b5654

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

impedance/tests/test_circuit_elements.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import string
2+
import warnings
23

34
import numpy as np
45
import pytest
@@ -92,9 +93,9 @@ def test_each_element():
9293
f(["hi"], ["yes", "hello"])
9394

9495
# Test no overflow in T at high frequencies
95-
with pytest.warns(None) as record:
96+
with warnings.catch_warnings():
97+
warnings.simplefilter("error")
9698
circuit_elements["T"]([1, 2, 50, 100], [10000])
97-
assert not record
9899

99100

100101
def test_s():

0 commit comments

Comments
 (0)