mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2024-12-26 06:30:29 +00:00
5c550d8524
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.
15 lines
345 B
Python
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()
|