2016-11-06 16:39:30 +00:00
|
|
|
from common import *
|
|
|
|
|
|
|
|
from trezor.ui import display
|
|
|
|
|
2017-12-16 01:11:26 +00:00
|
|
|
|
2016-11-06 16:39:30 +00:00
|
|
|
class TestDisplay(unittest.TestCase):
|
|
|
|
|
|
|
|
def test_clear(self):
|
|
|
|
display.clear()
|
|
|
|
|
|
|
|
def test_refresh(self):
|
|
|
|
display.refresh()
|
|
|
|
|
|
|
|
def test_bar(self):
|
|
|
|
display.bar(0, 0, 10, 10, 0xFFFF)
|
|
|
|
|
|
|
|
def test_orientation(self):
|
|
|
|
for o in [0, 90, 180, 270]:
|
|
|
|
display.orientation(o)
|
|
|
|
|
|
|
|
def test_backlight(self):
|
|
|
|
for b in range(256):
|
|
|
|
display.backlight(b)
|
|
|
|
|
|
|
|
def test_raw(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def test_save(self):
|
|
|
|
pass
|
|
|
|
|
2017-12-16 01:11:26 +00:00
|
|
|
|
2016-11-06 16:39:30 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|