Skip to content

Commit 1af1e40

Browse files
committed
TST:improve test_check_missing_no_components_missing to correctly handle warnings
1 parent db5aa9a commit 1af1e40

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit/test_rocket.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,10 @@ def test_check_missing_some_components(calisto):
401401
def test_check_missing_no_components_missing(calisto_robust):
402402
"""Tests the _check_missing_components method for a complete Rocket."""
403403
# Call directly — no warnings expected
404-
calisto_robust._check_missing_components()
404+
with pytest.warns(None) as record:
405+
calisto_robust._check_missing_components()
405406
# If any warning occurs, pytest will fail automatically
406-
assert True
407+
assert len(record) == 0
407408

408409

409410
def test_set_rail_button(calisto):

0 commit comments

Comments
 (0)