-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I tried to create a test that checks if reading a .mod file and writing it again results in equal files.
def test_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 files
with open(two_contour_model_file, 'rb') as file:
checksum1 = sum(bytearray(file.read()))
with open(tmp_path / "test_model.imod", 'rb') as file:
checksum2 = sum(bytearray(file.read()))
assert checksum1 == checksum2It does not.
> assert checksum1 == checksum2
E assert 46306 == 34925
tests/test_model_api.py:89: AssertionError
So there are probably parts of the ModFileSpec that are incomplete. Probably not a huge issue, but something to keep in mind.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels