class_docstr: Test TROPOMI L2 Reader.
class_docstr_tok: ["Test","TROPOMI","L2","Reader","."]
docstr: Load bounds dataset.
docstr_tok: ["Load","bounds","dataset","."]
code: def test_load_bounds(self):
      """Load bounds dataset."""
      from satpy.readers import load_reader
  
      r = load_reader(self.reader_configs)
      with mock.patch(
          "satpy.readers.tropomi_l2.netCDF4.Variable", xr.DataArray
      ):
          loadables = r.select_files_from_pathnames(
              [
                  "S5P_OFFL_L2__NO2____20180709T170334_20180709T184504_03821_01_010002_20180715T184729.nc",
              ]
          )
          r.create_filehandlers(loadables)
      keys = ["latitude_bounds", "longitude_bounds"]
      ds = r.load(keys)
      assert len(ds) == 2
      for key in keys:
          assert ds[key].attrs["platform_shortname"] == "S5P"
          assert "y" in ds[key].dims
          assert "x" in ds[key].dims
          assert "corner" in ds[key].dims
          # check assembled bounds
          left = np.vstack([ds[key][:, :, 0], ds[key][-1:, :, 3]])
          right = np.vstack([ds[key][:, -1:, 1], ds[key][-1:, -1:, 2]])
          dest = np.hstack([left, right])
          dest = xr.DataArray(dest, dims=("y", "x"))
          dest.attrs = ds[key].attrs
          assert dest.attrs["platform_shortname"] == "S5P"
          assert "y" in dest.dims
          assert "x" in dest.dims
          assert DEFAULT_FILE_SHAPE[0] + 1 == dest.shape[0]
          assert DEFAULT_FILE_SHAPE[1] + 1 == dest.shape[1]
          np.testing.assert_array_equal(
              dest[:-1, :-1], ds[key][:, :, 0]
          )
          np.testing.assert_array_equal(
              dest[-1, :-1], ds[key][-1, :, 3]
          )
          np.testing.assert_array_equal(
              dest[:, -1],
              np.append(ds[key][:, -1, 1], ds[key][-1:, -1:, 2]),
          )
  
file_path: satpy/satpy/tests/reader_tests/test_tropomi_l2.py
imports: import os
  import unittest
  from datetime import datetime, timedelta
  from unittest import mock
  import numpy
  import xarray
  from satpy.tests.reader_tests.test_netcdf_utils import FakeNetCDF4FileHandler
label_desc: Use image node_id 6 for calling the TestTROPOMIL2Reader obj's underlying member method code with example usage: obj.test_load_bounds() without return types