# pyresample.test.conftest module

Shared test configuration and fixtures.

pyresample.test.conftest.area_class(request)

  Get one of the currently active ‘AreaDefinition’ classes.

  Currently only includes the legacy ‘AreaDefinition’ class and the future ‘AreaDefinition’ class in ‘pyresample.future.geometry.area’.

pyresample.test.conftest.area_def_lcc_conus_1km()

  Create an AreaDefinition with an LCC projection over CONUS (1500, 2000).

pyresample.test.conftest.area_def_lonlat_pm180_target()

  Create an AreaDefinition with a geographic lon/lat projection with prime meridian at 180 (800, 850).

pyresample.test.conftest.area_def_stere_source()

  Create an AreaDefinition with a polar-stereographic projection (10, 50).

  This area is the same shape as input swath definitions.

pyresample.test.conftest.area_def_stere_target()

  Create an AreaDefinition with a polar-stereographic projection (800, 850).

pyresample.test.conftest.coord_def_2d_float32_dask()

  Create a 2D CoordinateDefinition of dask arrays (4, 3).

pyresample.test.conftest.create_test_area(area_class)

  Get a function for creating AreaDefinitions for testing.

  Should be used as a pytest fixture and will automatically run the test function with the legacy AreaDefinition class and the future AreaDefinition class. If tests require a specific class they should NOT use this fixture and instead use the exact class directly.

pyresample.test.conftest.create_test_swath(swath_class)

  Get a function for creating SwathDefinitions for testing.

  Should be used as a pytest fixture and will automatically run the test function with the legacy SwathDefinition class and the future SwathDefinition class. If tests require a specific class they should NOT use this fixture and instead use the exact class directly.

pyresample.test.conftest.data_1d_float32_xarray_dask()

  Create a sample 1D data DataArray(dask) (3,).

pyresample.test.conftest.data_2d_float32_dask(data_2d_float32_numpy)

  Create a sample 2D data numpy array (50, 10).

pyresample.test.conftest.data_2d_float32_numpy()

  Create a sample 2D data numpy array (50, 10).

pyresample.test.conftest.data_2d_float32_xarray_dask(data_2d_float32_dask)

  Create a sample 2D data DataArray(dask) (50, 10).

pyresample.test.conftest.data_2d_float32_xarray_numpy(data_2d_float32_numpy)

  Create a sample 2D data DataArray(numpy) (50, 10).

pyresample.test.conftest.data_3d_float32_xarray_dask()

  Create a sample 3D data DataArray(dask) (50, 10, 3).

pyresample.test.conftest.reset_pyresample_config(tmpdir)

  Set pyresample config to logical defaults for tests.

pyresample.test.conftest.swath_class(request)

  Get one of the currently active ‘SwathDefinition’ classes.

  Currently only includes the legacy ‘SwathDefinition’ class and the future ‘SwathDefinition’ class in ‘pyresample.future.geometry.swath’.

pyresample.test.conftest.swath_def_1d_xarray_dask()

  Create a 1D SwathDefinition of DataArrays(dask) (3,).

pyresample.test.conftest.swath_def_2d_dask()

  Create a SwathDefinition with dask arrays (200, 1500).

pyresample.test.conftest.swath_def_2d_numpy()

  Create a SwathDefinition with numpy arrays (200, 1500).

pyresample.test.conftest.swath_def_2d_numpy_antimeridian()

  Create a SwathDefinition with numpy arrays (200, 1500) over the antimeridian.

  Longitude values go from positive values to negative values as they cross -180/180.

pyresample.test.conftest.swath_def_2d_xarray_dask()

  Create a SwathDefinition with DataArrays(dask) (200, 1500).

pyresample.test.conftest.swath_def_2d_xarray_dask_antimeridian()

  Create a SwathDefinition with DataArrays(dask) arrays (200, 1500) over the antimeridian.

  Longitude values go from positive values to negative values as they cross -180/180.

pyresample.test.conftest.swath_def_2d_xarray_numpy()

  Create a SwathDefinition with DataArrays(numpy) (200, 1500).