class_docstr: Swap-in NetCDF4 File Handler for reader tests to use.
class_docstr_tok: ["Swap-in","NetCDF4","File","Handler","for","reader","tests","to","use","."]
docstr: Get fake file content from 'get_test_content'.
docstr_tok: ["Get","fake","file","content","from","'get_test_content","'","."]
code: def __init__(
      self,
      filename,
      filename_info,
      filetype_info,
      auto_maskandscale=False,
      xarray_kwargs=None,
      cache_var_size=0,
      cache_handle=False,
      extra_file_content=None,
  ):
      """Get fake file content from 'get_test_content'."""
      # unused kwargs from the real file handler
      del auto_maskandscale
      del xarray_kwargs
      del cache_var_size
      del cache_handle
      if NetCDF4FileHandler is object:
          raise ImportError(
              "Base 'NetCDF4FileHandler' could not be " "imported."
          )
      super(NetCDF4FileHandler, self).__init__(
          filename, filename_info, filetype_info
      )
      self.file_content = self.get_test_content(
          filename, filename_info, filetype_info
      )
      if extra_file_content:
          self.file_content.update(extra_file_content)
  
imports: import os
  import unittest
  import numpy
  import pytest
label_desc: Use image node_id 1 to create a new FakeNetCDF4FileHandler object from inherited base classes: NetCDF4FileHandler with example: obj = FakeNetCDF4FileHandler(filename, filename_info, filetype_info, auto_maskandscale, xarray_kwargs, cache_var_size, cache_handle, extra_file_content)