Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue #774: Fix assert_equal_content in test_rasterio_ascii #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions imod/tests/test_formats/test_rasterio.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ def write_rasterio(path, a, profile):
def assert_equal_content(path_a, path_b):
assert Path(path_a).exists()
assert Path(path_b).exists()
with open(path_a, "r") as f:
content_a = f.read()
with open(path_b, "r") as f:
content_b = f.read()
assert content_a == content_b
ds_a = xr.open_dataset(path_a, engine="rasterio")
ds_b = xr.open_dataset(path_b, engine="rasterio")

xr.testing.assert_identical(ds_a, ds_b)

da = xr.full_like(test_da, value)
profile = {
Expand Down