MCPcopy
hub / github.com/pydata/xarray / test_drop_encoding

Method test_drop_encoding

xarray/tests/test_dataset.py:3357–3370  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3355 orig.copy(data={"var1": new_var1})
3356
3357 def test_drop_encoding(self) -> None:
3358 orig = create_test_data()
3359 vencoding = {"scale_factor": 10}
3360 orig.encoding = {"foo": "bar"}
3361
3362 for k in orig.variables.keys():
3363 orig[k].encoding = vencoding
3364
3365 actual = orig.drop_encoding()
3366 assert actual.encoding == {}
3367 for v in actual.variables.values():
3368 assert v.encoding == {}
3369
3370 assert_equal(actual, orig)
3371
3372 def test_rename(self) -> None:
3373 data = create_test_data()

Callers

nothing calls this directly

Calls 5

create_test_dataFunction · 0.90
assert_equalFunction · 0.90
keysMethod · 0.80
drop_encodingMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected