Skip to content

Commit

Permalink
Align accepted filetypes with docstring description
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrjones committed Dec 20, 2024
1 parent 7a35bd4 commit 97187d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion virtualizarr/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def open_virtual_dataset(

if filetype is not None:
# if filetype is user defined, convert to FileType
filetype = FileType(filetype)
filetype = FileType(filetype.lower())
else:
filetype = automatically_determine_filetype(
filepath=filepath, reader_options=reader_options
Expand Down
2 changes: 2 additions & 0 deletions virtualizarr/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ def test_explicit_filetype(self, netcdf4_file):
with pytest.raises(NotImplementedError):
open_virtual_dataset(netcdf4_file, filetype="grib")

open_virtual_dataset(netcdf4_file, filetype="netCDF4")

def test_explicit_filetype_and_backend(self, netcdf4_file):
with pytest.raises(ValueError):
open_virtual_dataset(
Expand Down

0 comments on commit 97187d2

Please sign in to comment.