netcdf4-python
netcdf4-python copied to clipboard
Fix test_tocdl to pass on Windows.
Fixes test_tocdl on Windows.
The expected output is:
netcdf ubyte {
dimensions:
d = 2 ;
variables:
byte ub(d) ;
ub:_Unsigned = "true" ;
byte sb(d) ;
byte sb2(d) ;
sb2:_Unsigned = "false" ;
// global attributes:
:_Format = "classic" ;
}
But when the full path is provided, the output is something like:
netcdf C\:\\Users\\dev-admin\\Desktop\\netcdf\\netcdf4_1737132718267\\test_tmp\\test\\ubyte {
dimensions:
d = 2 ;
variables:
byte ub(d) ;
ub:_Unsigned = "true" ;
byte sb(d) ;
byte sb2(d) ;
sb2:_Unsigned = "false" ;
// global attributes:
:_Format = "classic" ;
}
Using the basename fixes this.
Looks like this issue might be isolated to my environment. Feel free to close this if it's not helpful.