def test_fetch_attributes(self): obj = CloudnetArray(self.time, 'test_name') obj.attr1 = 'a' obj.attr2 = 'b' obj.attr3 = 'c' result = ['units', 'attr1', 'attr2', 'attr3'] assert obj.fetch_attributes() == result
def test_fetch_attributes(self): obj = CloudnetArray(self.time, "test_name") obj.attr1 = "a" obj.attr2 = "b" obj.attr3 = "c" result = ["units", "attr1", "attr2", "attr3"] assert obj.fetch_attributes() == result
def test_fetch_attributes(fake_nc_file): nc = netCDF4.Dataset(fake_nc_file) test_var = nc.variables['time'] obj = CloudnetArray(test_var, 'test_name') obj.attr1 = 'a' obj.attr2 = 'b' obj.attr3 = 'c' result = ['units', 'attr1', 'attr2', 'attr3'] for attr in obj.fetch_attributes(): assert attr in result