Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit f744acf

Browse files
committed
fixed bug in tests
1 parent 7c295bd commit f744acf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/clue/adafruit_clue.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def __init__(self):
203203
"button_a": False,
204204
"button_b": False,
205205
"pressed_buttons": set(),
206-
"accelerometer": {"x": 0, "y": 0, "z": 0},
206+
"acceleration": {"x": 0, "y": 0, "z": 0},
207207
"color_sensor": {"r": 0, "g": 0, "b": 0, "c": 0},
208208
"magnetometer": {"x": 0, "y": 0, "z": 0},
209209
"gyro": {"x": 0, "y": 0, "z": 0},
@@ -268,9 +268,9 @@ def acceleration(self):
268268
print("Accel: {:.2f} {:.2f} {:.2f}".format(*clue.acceleration))
269269
"""
270270
return (
271-
self.__state["accelerometer"]["x"],
272-
self.__state["accelerometer"]["y"],
273-
self.__state["accelerometer"]["z"],
271+
self.__state["acceleration"]["x"],
272+
self.__state["acceleration"]["y"],
273+
self.__state["acceleration"]["z"],
274274
)
275275

276276
@property

src/clue/test/test_adafruit_clue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_color(self):
100100
}
101101
)
102102
assert clue.color == (MOCK_COLOR_R_A, MOCK_COLOR_G, MOCK_COLOR_B, MOCK_COLOR_C)
103-
assert clue._Clue__state["color_sensor"]["r"] == MOCK_COLOR_R_B
103+
clue._Clue__state["color_sensor"]["r"] = MOCK_COLOR_R_B
104104
assert clue.color == (MOCK_COLOR_R_B, MOCK_COLOR_G, MOCK_COLOR_B, MOCK_COLOR_C)
105105

106106
def test_temperature(self):

0 commit comments

Comments
 (0)