aiida_testing.mock_code package

Module contents

Defines fixtures for mocking AiiDA codes, with caching at the level of the executable.

aiida_testing.mock_code.mock_code_factory(aiida_localhost, testing_config, testing_config_action, mock_regenerate_test_data, mock_fail_on_missing, request: FixtureRequest, tmp_path: Path)[source]

Fixture to create a mock AiiDA Code.

testing_config_action :

Read config file if present (‘read’), require config file (‘require’) or generate new config file (‘generate’).

aiida_testing.mock_code.mock_regenerate_test_data(request)[source]

Read whether to regenerate test data from command line option.

aiida_testing.mock_code.pytest_addoption(parser)[source]

Add pytest command line options.

aiida_testing.mock_code.testing_config(testing_config_action)[source]

Get content of .aiida-testing-config.yml

testing_config_action :

Read config file if present (‘read’), require config file (‘require’) or generate new config file (‘generate’).

aiida_testing.mock_code.testing_config_action(request)[source]

Read action for testing configuration from command line option.