Closed lukecampbell closed 2 years ago
+1 Do you have an easy way to test this?
I can't seem to get the unit tests to run. They get stuck at S3 list files, but yes I have an easy way to test that involves mocks, let me see if I can get it running.
They get stuck at S3 list files
I suppose you need the moto server running
I added a simple test that simply mocks open_mfdataset
and invokes the OpenDapSource
calls in unit test and asserts that open_mfdataset
was called with the specified engine.
phew
:+1: thanks!
When
OpenDapSource._open_dataset
is called whenurlpath
is a list of OPeNDAP URLs, no engine is specified in the call toxr.open_mfdataset
even if engine is set in the class. This prevents clients from using a specified engine and reverts to xarray's default engine selection.This commit changes the call to
xr.open_mfdataset
to include the engine argument as theself.engine
value.