Skip to content

Commit

Permalink
change from deprecated pytest method of checking no warnings raised (E…
Browse files Browse the repository at this point in the history
  • Loading branch information
BGerwe authored Aug 7, 2024
1 parent f9fb12e commit 82b5654
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions impedance/tests/test_circuit_elements.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import string
import warnings

import numpy as np
import pytest
Expand Down Expand Up @@ -92,9 +93,9 @@ def test_each_element():
f(["hi"], ["yes", "hello"])

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


def test_s():
Expand Down

0 comments on commit 82b5654

Please sign in to comment.