Beispiel #1
0
 def test_brightness(self):
     widget = led_backpacks.SevenSegmentWidget(address='0x76',
                                               brightness='1')
     widget.set_value('-10.25')
Beispiel #2
0
 def test_invalid_value_fails(self):
     widget = led_backpacks.SevenSegmentWidget(address='0x76')
     with self.assertRaises(ValueError):
         widget.set_value('foo')
Beispiel #3
0
 def test_invert(self):
     widget = led_backpacks.SevenSegmentWidget(address='0x76',
                                               invert='True')
     widget.set_value('-10.25')
Beispiel #4
0
 def test_justify_left(self):
     widget = led_backpacks.SevenSegmentWidget(address='0x76',
                                               justify_right='False')
     widget.set_value('-10.25')
Beispiel #5
0
 def test_decimal_digits(self):
     widget = led_backpacks.SevenSegmentWidget(address='0x76',
                                               decimal_digits='1')
     widget.set_value('-10.25')
Beispiel #6
0
 def test_number(self):
     widget = led_backpacks.SevenSegmentWidget(address='0x76')
     widget.set_value('-10.25')
Beispiel #7
0
 def test_colon_off(self):
     widget = led_backpacks.SevenSegmentWidget(address='0x76')
     widget.set_value('colon_off')