Skip to content

Commit 4d58ad4

Browse files
committed
Count test-asserts per device/zone and output
1 parent 513c907 commit 4d58ad4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_init.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ def test_and_assert(test_dict, data, header):
553553
asserts = 0
554554
bsw_list = ["binary_sensors", "central", "climate", "sensors", "switches"]
555555
for testitem, measurements in test_dict.items():
556+
item_asserts = 0
556557
tests += 1
557558
assert testitem in data
558559
asserts += 1
@@ -586,12 +587,15 @@ def test_and_assert(test_dict, data, header):
586587
)
587588
assert val_1 == val_2
588589
asserts += 1
590+
item_asserts += 1
589591
else:
590592
assert details[measure_key] == measure_assert
591593
asserts += 1
594+
item_asserts += 1
595+
_LOGGER.debug("Item %s test-asserts: %s", testitem, item_asserts)
592596

593597
assert tests == asserts
594-
_LOGGER.debug("Number of zone test-assert: %s", asserts)
598+
_LOGGER.debug("Total device_zone test-asserts: %s", asserts)
595599

596600
# pragma warning disable S3776
597601

0 commit comments

Comments
 (0)