Add extra TrafficLight tests, and remove the redundant setattr function

- `CompositeDevice`s can't have any of their attributes set anyway
This commit is contained in:
Andrew Scheller
2016-09-19 12:00:38 +01:00
parent 322ec1316a
commit 1b3e6a429b
2 changed files with 6 additions and 7 deletions

View File

@@ -710,13 +710,6 @@ class TrafficLights(LEDBoard):
name = 'amber'
return super(TrafficLights, self).__getattr__(name)
def __setattr__(self, name, value):
if name == 'amber' and self._display_yellow:
name = 'yellow'
elif name == 'yellow' and not self._display_yellow:
name = 'amber'
return super(TrafficLights, self).__setattr__(name, value)
class PiTraffic(TrafficLights):
"""