Skip to content

Commit e381fad

Browse files
authored
tidy integration tests
1 parent 9bdf8b3 commit e381fad

File tree

6 files changed

+14
-926
lines changed

6 files changed

+14
-926
lines changed

makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
powermon-unit-tests:
2-
python3 -m unittest discover -s tests/unit -f -v
1+
integration-tests:
2+
python3 -m unittest discover -s tests/integration -f
33

4-
powermon-integration-tests:
4+
integration-tests_verbose:
55
python3 -m unittest discover -s tests/integration -f -v
66

77
test:
@@ -10,6 +10,9 @@ test:
1010
unit-tests:
1111
python3 -m unittest discover -s tests/unit -f
1212

13+
unit-tests-verbose:
14+
python3 -m unittest discover -s tests/unit -f -v
15+
1316
unit-tests-all:
1417
python3 -m unittest discover -s tests/unit
1518

powermon/commands/result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def readings_from_response(self, response, reading_definition) -> list[Reading]:
162162
""" return readings from a raw_response using the supplied reading definition """
163163
try:
164164
return reading_definition.reading_from_raw_response(response, override=self.command.override)
165-
except ValueError:
165+
except (ValueError, IndexError):
166166
error = Reading(raw_value=None, processed_value=reading_definition.get_invalid_message(response), definition=ReadingDefinition.from_config({"description": reading_definition.description}))
167167
error.is_valid = False
168168
return [error]

0 commit comments

Comments
 (0)