sentinelhub.testing_utils

Utility tools for writing unit tests for packages which rely on sentinelhub-py

sentinelhub.testing_utils.get_input_folder(current_file)[source]

Use fixtures if possible. This is meant only for test cases

Parameters

current_file (str) –

Return type

str

sentinelhub.testing_utils.get_output_folder(current_file)[source]

Use fixtures if possible. This is meant only for test cases

Parameters

current_file (str) –

Return type

str

sentinelhub.testing_utils.test_numpy_data(data=None, exp_shape=None, exp_dtype=None, exp_min=None, exp_max=None, exp_mean=None, exp_median=None, exp_std=None, delta=0.0001)[source]

Deprecated version of assert_statistics_match.

Parameters
Return type

None

sentinelhub.testing_utils.assert_statistics_match(data, exp_shape=None, exp_dtype=None, exp_min=None, exp_max=None, exp_mean=None, exp_median=None, exp_std=None, rel_delta=None, abs_delta=None)[source]

Validates basic statistics of data array :param data: Data array :param exp_shape: Expected shape :param exp_dtype: Expected dtype :param exp_min: Expected minimal value :param exp_max: Expected maximal value :param exp_mean: Expected mean value :param exp_median: Expected median value :param exp_std: Expected standard deviation value :param rel_delta: Precision of validation (relative) :param abs_delta: Precision of validation (absolute)

Parameters
Return type

None