def test_zero_len_dim(self, rootgrp_empty, dim_names1, dim_lens1): segy2netcdf._create_dimensions(dim_names1, dim_lens1, rootgrp_empty) for name, dim in rootgrp_empty.dimensions.items(): assert name in dim_names1 idx = dim_names1.index(name) assert dim.size == dim_lens1[idx]
def rootgrp_vars(tmpdir, dim_names1, dim_lens1): rootgrp = Dataset(tmpdir.join("tmp.nc"), "w", format="NETCDF4") segy2netcdf._create_dimensions(dim_names1, dim_lens1, rootgrp) segy2netcdf._create_variables(rootgrp, dim_names1, False) yield rootgrp rootgrp.close()
def rootgrp_dims(tmpdir, dim_names1, dim_lens1): rootgrp = Dataset(tmpdir.join('tmp.nc'), "w", format="NETCDF4") segy2netcdf._create_dimensions(dim_names1, dim_lens1, rootgrp) yield rootgrp rootgrp.close()