pytest_conftest module¶
Pytest helpers.
- gemseo.utils.testing.pytest_conftest.baseline_images(request)¶
Return the baseline_images contents.
Used when the compare_images decorator has indirect set.
- gemseo.utils.testing.pytest_conftest.disable_fault_handler()¶
Generator to temporarily disable the fault handler.
Return a call to disable the fault handler.
- Return type:
Generator[None, None, None]
- gemseo.utils.testing.pytest_conftest.import_or_skip_xlwings()¶
Fixture to skip a test when xlwings cannot be imported.
- Return type:
- gemseo.utils.testing.pytest_conftest.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:
- gemseo.utils.testing.pytest_conftest.module_tmp_wd(tmp_path_factory)¶
Generator to move into a temporary subdirectory forth and back.
Return the path to the temporary directory.
- gemseo.utils.testing.pytest_conftest.pytest_sessionfinish(session)[source]¶
Remove file pollution from fortran code.
- Return type:
None
- gemseo.utils.testing.pytest_conftest.pytest_sessionstart(session)[source]¶
Bypass console pollution from fortran code.
- Return type:
None
- gemseo.utils.testing.pytest_conftest.reset_factory()¶
Reset the factory cache.
- gemseo.utils.testing.pytest_conftest.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
- gemseo.utils.testing.pytest_conftest.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
- gemseo.utils.testing.pytest_conftest.skip_under_windows(request)¶
Fixture that add a marker to skip under windows.
Use it like a usual skip marker.
- Return type:
None
- gemseo.utils.testing.pytest_conftest.tmp_wd(tmp_path)¶
Generator to move into a temporary directory forth and back.
Return the path to the temporary directory.