gemseo.utils.testing.helpers module#

Comparison tools for testing.

class do_not_raise(*args, **kwargs)[source]#

Bases: nullcontext

Return 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" as style if missing. Use ["png"] as extensions if missing.

Parameters:
Return type:

None