From 82b56542c51b929884b9ee9373d8df94d177d079 Mon Sep 17 00:00:00 2001 From: Brian Gerwe Date: Wed, 7 Aug 2024 14:27:43 -0700 Subject: [PATCH] change from deprecated pytest method of checking no warnings raised (#301) --- impedance/tests/test_circuit_elements.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/impedance/tests/test_circuit_elements.py b/impedance/tests/test_circuit_elements.py index 89a4f65..a3f1b7d 100644 --- a/impedance/tests/test_circuit_elements.py +++ b/impedance/tests/test_circuit_elements.py @@ -1,4 +1,5 @@ import string +import warnings import numpy as np import pytest @@ -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():