I hope there is some way to get pytest to work with pickle.
If not, it will probably work to persist the data as a dict using json. There are two ways to do that:
- Continue to use namedtuple or custom classes for convenient access to attributes (item.foo instead of item["foo"]) but write a translator between that and a dict.
- Use a dict for everything.
Either way, it'll be a headache when we switch from pupil to field angle unless we persist the json data using field angle now. That's important because I'd really like to continue to use the persisted test data for the new camera geometry distortion model in
DM-5922 (which must use field angle).