예제 #1
0
 def test_battery_and_light(self):
     l = LightMeter(incident_light=4096, battery=1.44)
     assert l.reading() == 4096
예제 #2
0
 def test_no_battery(self):
     l = LightMeter(incident_light=0, battery=1.44)
     assert l.reading() == 0
예제 #3
0
 def test_no_light(self):
     l = LightMeter(incident_light=4096, battery=0)
     assert l.reading() == None
예제 #4
0
 def test_no_battery_no_light(self):
     l = LightMeter()
     assert l.reading() == None