Closed thijstriemstra closed 7 years ago
Yup it's getting (gone past) unsustainable. Think pickling might be the way to go here, one file per device/test as you suggest.
Decided json makes more sense. Exporting them now using:
import io
import json
import os.path
from baseline_data import demo_ssd1351
print(demo_ssd1351)
fpath = os.path.join('reference', 'data', 'demo_ssd1351.json')
with io.open(fpath, 'w', encoding='utf-8') as f:
f.write(json.dumps(demo_ssd1351, ensure_ascii=False))
https://github.com/rm-hull/luma.oled/blob/master/tests/baseline_data.py is currently 236 KB and filled with data that is not appropriate, or suitable, to store in a python source file. I think we should move it to separate files, something like
demo_ssd1306.dat
or whatever. It could hold a pickled version of the data which would be loaded for every test (suite) (?).