pytest_gee.list_regression#

Implementation of the list_regression fixture.

Classes#

ListFixture

Fixture for regression testing of ee.List.

Module Contents#

class pytest_gee.list_regression.ListFixture(datadir, original_datadir, request)[source]#

Bases: pytest_regressions.data_regression.DataRegressionFixture

Fixture for regression testing of ee.List.

Parameters:
check(data_list, basename=None, fullpath=None, prescision=6)[source]#

Check the given list against a previously recorded version, or generate a new file.

Parameters:
  • data_list (ee.List) – The list 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 datadir fixture 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.

  • prescision (int)