ii-vision/transcoder/make_data_tables_test.py
kris 5c550d8524 Separate the details of the bitmap packing from operations on the
packed representation (diff, apply etc).  This allows the (D)HGRBitmap
classes to focus on the bitmap packing and share common logic.

Numpy has unfortunate long-standing bugs to do with type coercion of
np.uint64, which leads to spurious "incompatible type" warnings when
e.g. operating on a np.uint64 and some other integer type.  To work
around this we cast explicitly to np.uint64 everywhere.

Get tests working again - for now HGR tests in screen_test.py are
disabled until I finish implementing new packing.

HGRBitmap is still incomplete although closer.
2019-07-04 15:21:20 +01:00

15 lines
345 B
Python

import unittest
from colours import HGRColours
import make_data_tables
class TestMakeDataTables(unittest.TestCase):
def test_pixel_string(self):
pixels = (HGRColours.BLACK, HGRColours.WHITE, HGRColours.ORANGE)
self.assertEqual("0FC", make_data_tables.pixel_string(pixels))
if __name__ == '__main__':
unittest.main()