Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cli options for config file management #33

Merged
merged 16 commits into from
Apr 1, 2020
4 changes: 4 additions & 0 deletions aiida_testing/mock_code/_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def _get_mock_code(
# can not be reused.
code_label = f'mock-{label}-{uuid.uuid4()}'

data_dir_abspath = pathlib.Path(data_dir_abspath).absolute()
ltalirz marked this conversation as resolved.
Show resolved Hide resolved
if not data_dir_abspath.exists():
raise ValueError("Data directory '{}' does not exist".format(data_dir_abspath))

mock_executable_path = shutil.which('aiida-mock-code')
if not mock_executable_path:
raise ValueError(
Expand Down
3 changes: 3 additions & 0 deletions tests/mock_code/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def test_basic(mock_code_factory, generate_diff_inputs): # pylint: disable=rede
res, node = run_get_node(
CalculationFactory(CALC_ENTRY_POINT), code=mock_code, **generate_diff_inputs()
)
assert node.exit_status == 0, "diff calculation failed with exit status {}".format(
node.exit_status
)
assert node.is_finished_ok
check_diff_output(res)

Expand Down