class_docstr: Test NetCDF4 File Handler Utility class.
class_docstr_tok: ["Test","NetCDF4","File","Handler","Utility","class","."]
docstr: Test that the data are cached when get_and_cache_npxr() is called.
docstr_tok: ["Test","that","the","data","are","cached","when","get_and_cache_npxr","(",")","is","called","."]
code: def test_get_and_cache_npxr_data_is_cached(self):
      """Test that the data are cached when get_and_cache_npxr() is called."""
      from satpy.readers.netcdf_utils import NetCDF4FileHandler
  
      file_handler = NetCDF4FileHandler(
          "test.nc", {}, {}, cache_handle=True
      )
      data = file_handler.get_and_cache_npxr("test_group/ds1_f")
  
      # Delete the dataset from the file content dict, it should be available from the cache
      del file_handler.file_content["test_group/ds1_f"]
      data2 = file_handler.get_and_cache_npxr("test_group/ds1_f")
      assert np.all(data == data2)
  
imports: import os
  import unittest
  import numpy
  import pytest
label_desc: Use image node_id 9 for calling the TestNetCDF4FileHandler obj's underlying member method code with example usage: obj.test_get_and_cache_npxr_data_is_cached() without return types