pytest_gee.feature_collection_regression#
Implementation of the feature_collection_regression fixture.
Classes#
Fixture for regression testing of |
Module Contents#
- class pytest_gee.feature_collection_regression.FeatureCollectionFixture(datadir, original_datadir, request)[source]#
Bases:
pytest_regressions.data_regression.DataRegressionFixtureFixture for regression testing of
ee.FeatureCollection.- Parameters:
datadir (pytest_datadir.LazyDataDir)
original_datadir (pathlib.Path)
request (pytest.FixtureRequest)
- check(data_fc, basename=None, fullpath=None, prescision=6, drop_index=False)[source]#
Check the given list against a previously recorded version, or generate a new file.
- Parameters:
data_fc (ee.FeatureCollection) – The feature collection to check.
basename (Optional[str]) – The basename of the file to test/record. If not given the name of the test is used.
fullpath (Optional[os.PathLike]) – complete path to use as a reference file. This option will ignore
datadirfixture when reading expected files but will still use it to write obtained files. Useful if a reference file is located in the session data dir for example.precision – The number of decimal places to round to when comparing floats.
drop_index – If True, the
system:indexproperty will be removed from the feature collection before checking.prescision (int)