During the last couple of months the default python3 pickle version has changed. This has caused files created by the Opt-ID to have slightly different header lengths and values than those originally created by python3 cPickle that are used to validate test results.
This PR implements Magnets::__eq__ and MagLists::__eq__ deep comparison methods to compare that two python class instances really do contain the same data values. The test cases have been updates to load in expected and observed files using pickle and then offloading the comparison to those methods.
Additionally this PR includes minor quality of life and typo fixes in debug messages, and tries to apply the use of with open() as file: closures where needed to ensure that files are closed gracefully when exceptions are thrown.
During the last couple of months the default python3 pickle version has changed. This has caused files created by the Opt-ID to have slightly different header lengths and values than those originally created by python3 cPickle that are used to validate test results.
This PR implements
Magnets::__eq__
andMagLists::__eq__
deep comparison methods to compare that two python class instances really do contain the same data values. The test cases have been updates to load in expected and observed files using pickle and then offloading the comparison to those methods.Additionally this PR includes minor quality of life and typo fixes in debug messages, and tries to apply the use of
with open() as file:
closures where needed to ensure that files are closed gracefully when exceptions are thrown.