gemseo / utils / testing

Hide inherited members

helpers module

Comparison tools for testing.

class gemseo.utils.testing.helpers.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().

gemseo.utils.testing.helpers.concretize_classes(*classes)[source]

Context manager forcing classes to be concrete.

Parameters:

*classes (type) – The classes.

Return type:

None

gemseo.utils.testing.helpers.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:
  • args (Any) –

  • kwargs (Any) –

Return type:

None