simrunrobust_dask_delayed_execution_assert_value

_assert_value

simrun.robust_dask_delayed_execution._assert_value(db, k, value, behaviour='warning')

Assert that the value in the database is as expected.

Parameters:
  • db (str) – The path to the database.

  • k (tuple) – The key in the database value.

  • value – The expected value.

  • behaviour (str) – The behaviour if the value is not as expected. Can be 'warning' or 'error'.

Raises:
  • RuntimeError – If the value is not as expected and the behaviour is 'error'.

  • ValueError – If the behaviour is not 'warning' or 'error'.