fgen_runtime.testing#
Testing tools
CompareDataCallable#
assert_timeseries_collection_equal#
- assert_timeseries_collection_equal(left, right)[source]#
Assert that two
TimeseriesCollection
are equal- Parameters:
left (
fgen_runtime.timeseries_collection.TimeseriesCollection
) – First object to compareright (
fgen_runtime.timeseries_collection.TimeseriesCollection
) – Second object to compare
- Raises:
AssertionError – The two objects are not equal
- Return type:
assert_timeseries_collection_allclose#
- assert_timeseries_collection_allclose(left, right, rtol=1e-06, atol=1e-08)[source]#
Assert that two
TimeseriesCollection
’s values are all close- Parameters:
left (
fgen_runtime.timeseries_collection.TimeseriesCollection
) – First object to compareright (
fgen_runtime.timeseries_collection.TimeseriesCollection
) – Second object to comparertol (
float
) – Relative tolerance to pass through topint.testing.assert_allclose()
atol (
float
) – Absolute tolerance to pass through topint.testing.assert_allclose()
- Raises:
AssertionError – The two objects are not equal
- Return type:
assert_timeseries_collection_compare#
- assert_timeseries_collection_compare(left, right, compare_data, get_data_error_message)[source]#
Assert that two
TimeseriesCollection
’s values are all close- Parameters:
left (
fgen_runtime.timeseries_collection.TimeseriesCollection
) – First object to compareright (
fgen_runtime.timeseries_collection.TimeseriesCollection
) – Second object to comparecompare_data (
fgen_runtime.testing.CompareDataCallable
) – Function to use to compare the data attributes of left and rightget_data_error_message (
typing.Callable
[[int
],str
]) – Function that creates the error message if the data attributes are not identical based on the index that is being compared.
- Raises:
AssertionError – The two objects are not equal
- Return type: