Skip to content

Commit

Permalink
Fix and add missing assert
Browse files Browse the repository at this point in the history
  • Loading branch information
tersal committed Dec 4, 2024
1 parent a6da576 commit 5f86eb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/python_testing/TC_WASHERCTRL_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ async def test_TC_WASHERCTRL_2_1(self):
cluster=Clusters.Objects.LaundryWasherControls,
attribute=Clusters.LaundryWasherControls.Attributes.SpinSpeeds)

asserts.assert_true(isinstance(list_speed_speeds, list), "Returned value was not a list")
numSpinSpeeds = len(list_speed_speeds)
asserts.assert_less_equal(numSpinSpeeds, MAX_SPIN_SPEEDS, "List of SpinSpeeds larger than maximum allowed")

Expand All @@ -97,7 +98,7 @@ async def test_TC_WASHERCTRL_2_1(self):
cluster=Clusters.Objects.LaundryWasherControls,
attribute=Clusters.LaundryWasherControls.Attributes.SpinSpeedCurrent)
asserts.assert_true(isinstance(spin_speed_current, int), "SpinSpeedCurrent has an invalid value")
asserts.assert_true(0 <= spin_speed_current <= (numSpinSpeeds - 1), 0, "SpinSpeedCurrent outside valid range")
asserts.assert_true(0 <= spin_speed_current <= (numSpinSpeeds - 1), "SpinSpeedCurrent outside valid range")

# Write a valid SpinSpeedCurrent value
self.step(4)
Expand Down

0 comments on commit 5f86eb2

Please sign in to comment.