pelicun.tests.conftest

Functions

_setup_common_test_data()

Create a temporary directory with common test data for regional simulations.

mock_dlml_data_check(request)

Mocks the DLML data check for the entire test session, UNLESS the test is in the specific exclusion list.

setup_earthquake_test_data()

Create a temporary directory with mock data for earthquake tests.

setup_hurricane_test_data()

Create a temporary directory with mock data for hurricane tests.

pelicun.tests.conftest.mock_dlml_data_check(request: FixtureRequest) Generator[None, None, None][source]

Mocks the DLML data check for the entire test session, UNLESS the test is in the specific exclusion list.

This provides a high-performance, fail-safe “no network” policy while allowing specific integration tests to run their own logic.

pelicun.tests.conftest.setup_earthquake_test_data() Generator[Path, None, None][source]

Create a temporary directory with mock data for earthquake tests.

This fixture: 1. Uses the common helper to create the temporary directory and common files 2. Adds earthquake-specific building inventory 3. Adds earthquake-specific configuration and data files 4. Yields the path to the temporary directory 5. Cleans up after the test by removing the directory and all its contents

Yields:

Generator yielding the Path object to the temporary directory

pelicun.tests.conftest.setup_hurricane_test_data() Generator[Path, None, None][source]

Create a temporary directory with mock data for hurricane tests.

This fixture: 1. Uses the common helper to create the temporary directory and common files 2. Adds hurricane-specific building inventory with features like RoofShape and Shutters 3. Adds hurricane-specific configuration and data files 4. Yields the path to the temporary directory 5. Cleans up after the test by removing the directory and all its contents

Yields:

Generator yielding the Path object to the temporary directory