Skip to content

Commit

Permalink
dmrpp relative paths tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Dec 3, 2024
1 parent 25acdf9 commit ac04cef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions virtualizarr/tests/test_readers/test_dmrpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,21 @@ def test_parse_chunks(
assert result == expected


@pytest.fixture
def basic_dmrpp_temp_filepath(tmp_path: Path) -> Path:
# TODO generalize key here? Would require the factory pattern
# (https://docs.pytest.org/en/stable/how-to/fixtures.html#factories-as-fixtures)
drmpp_xml_str = DMRPP_XML_STRINGS["basic"]

# TODO generalize filename here?
filepath = tmp_path / "test.nc.dmrpp"

with open(filepath, "w") as f:
f.write(drmpp_xml_str)

return filepath


class TestRelativePaths:
def test_absolute_path_to_dmrpp_file_containing_relative_path(
self,
Expand Down

0 comments on commit ac04cef

Please sign in to comment.