pytest_gee.plugin ================= .. py:module:: pytest_gee.plugin .. autoapi-nested-parse:: A pytest plugin to build a GEE environment for a test session. Functions --------- .. autoapisummary:: pytest_gee.plugin.ee_dictionary_regression pytest_gee.plugin.ee_feature_collection_regression pytest_gee.plugin.ee_image_regression pytest_gee.plugin.ee_list_regression pytest_gee.plugin.gee_folder_root pytest_gee.plugin.gee_folder_structure pytest_gee.plugin.gee_hash pytest_gee.plugin.gee_test_folder Module Contents --------------- .. py:function:: ee_dictionary_regression(datadir, original_datadir, request) Fixture to test `ee.Dictionary` objects. :param datadir: The directory where the data files are stored. :param original_datadir: The original data directory. :param request: The pytest request object. :returns: The DictionaryFixture object. .. rubric:: Example .. code-block:: python def test_dictionary_regression(dictionary_regression): data = ee.Dictionary({"a": 1, "b": 2}) dictionary_regression.check(data) .. py:function:: ee_feature_collection_regression(datadir, original_datadir, request) Fixture to test :py:class:`ee.FeatureCollection` objects. :param datadir: The directory where the data files are stored. :param original_datadir: The original data directory. :param request: The pytest request object. :returns: The FeatureCollectionFixture object. .. rubric:: Example .. code-block:: python def test_feature_collection_regression(feature_collection_regression): data = ee.FeatureCollection("FAO/GAUL/2015/level0").filter(ee.Filter.eq("ADM0_NAME", "Holy See")) feature_collection_regression.check(data) .. py:function:: ee_image_regression(datadir, original_datadir, request) Fixture to test :py:class:`ee.Image` objects. :param datadir: The directory where the data files are stored. :param original_datadir: The original data directory. :param request: The pytest request object. :returns: The ImageFixture object. .. rubric:: Example .. code-block:: python def test_image_regression(image_regression): data = ee.Image("LANDSAT/LC08/C02/T1_L2/LC08_191031_20210514") image_regression.check(data, scale=1000) .. py:function:: ee_list_regression(datadir, original_datadir, request) Fixture to test :py:class:`ee.List` objects. :param datadir: The directory where the data files are stored. :param original_datadir: The original data directory. :param request: The pytest request object. :returns: The ListFixture object. .. rubric:: Example .. code-block:: python def test_list_regression(list_regression): data = ee.List([1, 2, 3]) list_regression.check(data) .. py:function:: gee_folder_root() Link to the root folder of the connected account. .. py:function:: gee_folder_structure() The structure of the generated test folder. .. py:function:: gee_hash() Generate a unique hash for the test session. .. py:function:: gee_test_folder(gee_hash, gee_folder_root, gee_folder_structure) Create a test folder for the duration of the test session.