Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* correct noop import (fixes #19) * require luma.core 1.0.0 or newer * add test for clut module * add segment_mapper test * add more emulator tests
- Loading branch information
1 parent
c833c09
commit 0682c31
Showing
6 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2017 Richard Hull and contributors | ||
# See LICENSE.rst for details. | ||
|
||
""" | ||
Tests for :py:class:`luma.emulator.clut`. | ||
""" | ||
|
||
from luma.emulator.clut import rgb2short | ||
|
||
|
||
def test_rgb2short(): | ||
assert rgb2short(100, 100, 100) == 59 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2017 Richard Hull and contributors | ||
# See LICENSE.rst for details. | ||
|
||
""" | ||
Tests for :py:class:`luma.emulator.segment_mapper`. | ||
""" | ||
|
||
from luma.emulator.segment_mapper import regular | ||
|
||
|
||
def test_regular(): | ||
result = [48, 109, 121, 51, 0, 127, 15, 78] | ||
for index, val in enumerate(regular('1234 BTC')): | ||
assert val == result[index] |