Skip to content

Commit 2d53cd8

Browse files
committed
Update tests
1 parent 83f9110 commit 2d53cd8

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def query(self, request: str) -> str:
6565
"""
6666
# Assert that we have not run out of responses
6767
# and that the request is the next one we expect
68-
assert self.request_index < len(self.responses)
68+
assert self.request_index < len(self.responses), f"Unexpected request: {request}"
6969
assert request == self.responses[self.request_index][0]
7070

7171
# Fetch the response and increment the request index

tests/test_arduino.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,8 @@ def test_arduino_pins(arduino_serial: MockArduino) -> None:
147147

148148
# Test that we can get the analog value of a pin
149149
arduino_serial.serial_wrapper._add_responses([
150-
("PIN:2:MODE:GET?", "OUTPUT"), # mode is read before analog value
151-
("PIN:2:MODE:GET?", "OUTPUT"),
152-
("PIN:10:MODE:GET?", "INPUT"),
153-
("PIN:14:MODE:GET?", "INPUT"),
154150
("PIN:14:ANALOG:GET?", "1000"),
155151
])
156-
with pytest.raises(IOError, match=r"Analog read is not supported.*"):
157-
arduino.pins[2].analog_value
158152
with pytest.raises(IOError, match=r"Pin does not support analog read"):
159153
arduino.pins[10].analog_value
160154
# 4.888 = round((5 / 1023) * 1000, 3)

0 commit comments

Comments
 (0)