Skip to content

Commit

Permalink
Python test case code-review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesharrow committed Feb 9, 2024
1 parent c068b61 commit 4efe496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/python_testing/TC_EPM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ async def test_TC_EPM_2_1(self):
self.step("3")
number_of_measurements = await self.read_epm_attribute_expect_success("NumberOfMeasurementTypes")
logger.info(f"Rx'd NumberOfMeasurementTypes: {number_of_measurements}")
asserts.assert_greater(number_of_measurements, 1,
"NumberOfMeasurementTypes must be > 1")
asserts.assert_greater_equal(number_of_measurements, 1,
"NumberOfMeasurementTypes must be >= 1")

self.step("4")
accuracy = await self.read_epm_attribute_expect_success("Accuracy")
Expand Down
9 changes: 4 additions & 5 deletions src/python_testing/TC_EPM_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,16 @@ async def test_TC_EPM_2_2(self):

self.step("5a")
active_power2 = await self.check_epm_attribute_in_range("ActivePower", 980000, 1020000) # 1kW +/- 20W
asserts.assert_not_equal(active_power, active_power2,
f"Expected ActivePower readings to have changed {active_power}, {active_power2}")

self.step("5b")
active_current2 = await self.check_epm_attribute_in_range("ActiveCurrent", 3848, 4848) # 4.348 A +/- 500mA
asserts.assert_not_equal(active_current, active_current2,
f"Expected ActiveCurrent readings to have changed {active_current}, {active_current2}")

self.step("5c")
voltage2 = await self.check_epm_attribute_in_range("Voltage", 229000, 231000) # 230V +/- 1V

asserts.assert_not_equal(active_power, active_power2,
f"Expected ActivePower readings to have changed {active_power}, {active_power2}")
asserts.assert_not_equal(active_current, active_current2,
f"Expected ActiveCurrent readings to have changed {active_current}, {active_current2}")
asserts.assert_not_equal(voltage, voltage2, f"Expected Voltage readings to have changed {voltage}, {voltage2}")

self.step("6")
Expand Down

0 comments on commit 4efe496

Please sign in to comment.