You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to create a test that checks if reading a .mod file and writing it again results in equal files.
deftest_read_write_read_rountrip(two_contour_model_file, tmp_path):
"""Check that reading and writing a model file results in the same data."""model=ImodModel.from_file(two_contour_model_file)
model.to_file(tmp_path/"test_model.imod")
# Compare checksums of the two fileswithopen(two_contour_model_file, 'rb') asfile:
checksum1=sum(bytearray(file.read()))
withopen(tmp_path/"test_model.imod", 'rb') asfile:
checksum2=sum(bytearray(file.read()))
assertchecksum1==checksum2
I tried to create a test that checks if reading a .mod file and writing it again results in equal files.
It does not.
So there are probably parts of the ModFileSpec that are incomplete. Probably not a huge issue, but something to keep in mind.
The text was updated successfully, but these errors were encountered: