示例#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