gemseo.utils.testing.helpers module#
Comparison tools for testing.
- class do_not_raise(*args, **kwargs)[source]#
Bases:
nullcontextReturn a context manager like
pytest.raises()but that does nothing.- Parameters:
*args (Any) -- The arguments to match the signature of
pytest.raises().**kwargs (Any) -- The keyword arguments to match the signature of
pytest.raises().
- concretize_classes(*classes)[source]#
Context manager forcing classes to be concrete.
- Parameters:
*classes (type) -- The classes.
- Return type:
None
- image_comparison(*args, **kwargs)[source]#
Compare matplotlib images generated by the tests with reference ones.
This overloads
matplotlib.testing.decorators.image_comparison()by using"default"asstyleif missing. Use["png"]asextensionsif missing.Also add the mark
postto the corresponding tests.- Parameters:
args (Any)
kwargs (Any)
- Return type:
Callable[[Any], Callable[[Any, Any], Any]]