Muscat.Helpers.CheckTools module¶
- MustFailFunction(func: Callable, *args, **kwargs) None [source]¶
- Helper function to check a call of a function raise an exception
correctly
- Parameters:
func (Callable) – the function to be called, args, kwargs are the argument passed to the function
- Raises:
RuntimeError – Raise un exception of the function does NOT fail (in the sens of a exception raise)
- MustFailFunctionWith(exceptionType, func: Callable, *args, **kwargs) None [source]¶
- Helper function to check a call of a function raise an exception
correctly
- Parameters:
func (Callable) – the function to be called, args, kwargs are the argument passed to the function
- Raises:
RuntimeError – Raise un exception of the function does NOT fail (in the sens of a exception raise)
- RunListOfCheckIntegrities(toTest: List[Callable[[bool], str]], GUI: bool = False) str [source]¶
- Execute all the functions in the list. Stop at the first error.
the functions must return “ok”, “skip” to be treated as successful function
- Parameters:
toTest (List[Callable[[bool],str] ]) – a list of functions
GUI (bool, optional) – bool argument passed to every function , by default False
- Returns:
“ok” if all functions are executed correctly (the return of every function is “ok”) “error…” at the first error encountered
- Return type:
str