Skip to content

Commit

Permalink
add one more check in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lgiacome committed Nov 20, 2024
1 parent 71ca75b commit 1f9a0d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,13 +596,17 @@ def test_element_from_wake_and_impedance_table():

assert component_found

assert hasattr(component, 'wake')

if hasattr(component, 'wake'):
test_wake = np.interp(test_points_wake, wake_table['time'],
wake_table[component_kind])

xo.assert_allclose(component.wake(test_points_wake), test_wake,
rtol=1e-3)

hasattr(component, 'impedance')

if hasattr(component, 'impedance'):
test_impedance = np.interp(test_points_impedance,
impedance_table['frequency'],
Expand Down

0 comments on commit 1f9a0d4

Please sign in to comment.