class_docstr: Test CF writer with 'encoding' dataset attribute.
docstr: Test 'encoding' dataset attribute.
docstr_tok: ["Test","'encoding","'","dataset","attribute","."]
code: def test_encoding_attribute(
      self, scene_with_encoding, filename, expected
  ):
      """Test 'encoding' dataset attribute."""
      scene_with_encoding.save_datasets(filename=filename, writer="cf")
      self._assert_encoding_as_expected(filename, expected)
  
imports: import os
  import tempfile
  import warnings
  from datetime import datetime
  import numpy
  import pytest
  import xarray
  from packaging.version import Version
  from satpy import Scene
  from satpy.tests.utils import make_dsq
  from satpy.writers.cf_writer import _get_backend_versions
label_desc: Use image node_id 2 for calling the TestEncodingAttribute obj's underlying member method code with example usage: obj.test_encoding_attribute(scene_with_encoding, filename, expected) without return types