-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtest_temp_control.py
More file actions
53 lines (38 loc) · 1.35 KB
/
Copy pathtest_temp_control.py
File metadata and controls
53 lines (38 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import pytest
from temp_control import TemperatureController, RealFanControl, RealTemperatureSensor, FanSpeed
def test_fan_turns_high_at_50_degrees():
# GIVEN a sensor that reports 50 degrees
# ...
# WHEN the temperature controller regulates the fan speed
# controller = TemperatureController(...)
# controller.regulate_fan_speed()
# THEN the fan should be set to HIGH speed
# ...
assert False
def test_fan_turns_medium_at_35_degrees():
# GIVEN a sensor that reports 35 degrees
# ...
# WHEN the temperature controller regulates the fan speed
# controller = TemperatureController(...)
# controller.regulate_fan_speed()
# THEN the fan should be set to MEDIUM speed
# ...
assert False
def test_fan_turns_low_at_25_degrees():
# GIVEN a sensor that reports 25 degrees
# ...
# WHEN the temperature controller regulates the fan speed
# controller = TemperatureController(...)
# controller.regulate_fan_speed()
# THEN the fan should be set to LOW speed
# ...
assert False
def test_fan_turns_off_at_20_degrees():
# GIVEN a sensor that reports 20 degrees
# ...
# WHEN the temperature controller regulates the fan speed
# controller = TemperatureController(...)
# controller.regulate_fan_speed()
# THEN the fan should be truned OFF
# ...
assert False