gemseo.utils.testing.pytest_conftest module#

Pytest helpers.

baseline_images(request)#

Return the baseline_images contents.

Used when the compare_images decorator has indirect set.

disable_fault_handler()#

Generator to temporarily disable the fault handler.

Return a call to disable the fault handler.

Return type:

Generator[None, None, None]

import_or_skip_xlwings()#

Fixture to skip a test when xlwings cannot be imported.

Return type:

Any

is_xlwings_usable(import_or_skip_xlwings, disable_fault_handler)#

Check if xlwings is usable.

Parameters:
  • import_or_skip_xlwings -- Fixture to import xlwings when available, otherwise skip the test.

  • disable_fault_handler -- Fixture to temporarily disable the fault handler.

Return type:

bool

module_tmp_wd(tmp_path_factory)#

Generator to move into a temporary subdirectory forth and back.

Return the path to the temporary directory.

pytest_sessionfinish(session)[source]#

Remove file pollution from fortran code.

Return type:

None

pytest_sessionstart(session)[source]#

Bypass console pollution from fortran code.

Return type:

None

reset_factory()#

Reset the factory cache.

skip_if_xlwings_is_not_usable(is_xlwings_usable)#

Fixture to skip a test when xlwings is not usable.

Parameters:

is_xlwings_usable (bool)

Return type:

None

skip_if_xlwings_is_usable(is_xlwings_usable)#

Fixture to skip a test when xlwings is usable.

Parameters:

is_xlwings_usable (bool)

Return type:

None

skip_under_windows(request)#

Fixture that add a marker to skip under windows.

Use it like a usual skip marker.

Return type:

None

tmp_wd(tmp_path)#

Generator to move into a temporary directory forth and back.

Return the path to the temporary directory.