From d5733b225c4e1e916c218537b3a0447d6f9f504d Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Fri, 20 Dec 2024 16:33:37 +0100 Subject: [PATCH] use aiida_profile_clean for test_input_code test --- tests/tools/archive/orm/test_codes.py | 4 ++-- tests/tools/groups/test_paths.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/tools/archive/orm/test_codes.py b/tests/tools/archive/orm/test_codes.py index 27ae5f7882..5edc7e2fc7 100644 --- a/tests/tools/archive/orm/test_codes.py +++ b/tests/tools/archive/orm/test_codes.py @@ -35,7 +35,7 @@ def test_that_solo_code_is_exported_correctly(aiida_profile, tmp_path, aiida_loc assert orm.load_node(code_uuid).label == code_label -def test_input_code(aiida_profile, tmp_path, aiida_localhost): +def test_input_code(aiida_profile_clean, tmp_path, aiida_localhost): """This test checks that when a calculation is exported then the corresponding code is also exported. It also checks that the links are also in place after the import. @@ -59,7 +59,7 @@ def test_input_code(aiida_profile, tmp_path, aiida_localhost): export_file = tmp_path / 'export.aiida' create_archive([calc], filename=export_file) - aiida_profile.reset_storage() + aiida_profile_clean.reset_storage() import_archive(export_file) diff --git a/tests/tools/groups/test_paths.py b/tests/tools/groups/test_paths.py index 6ff2459650..3a8d4dbb69 100644 --- a/tests/tools/groups/test_paths.py +++ b/tests/tools/groups/test_paths.py @@ -116,6 +116,7 @@ def test_walk(setup_groups): @pytest.mark.filterwarnings('ignore::UserWarning') +@pytest.mark.usefixtures('aiida_profile_clean') def test_walk_with_invalid_path(): """Test the ``GroupPath.walk`` method with invalid paths.""" for label in ['a', 'a/b', 'a/c/d', 'a/c/e/g', 'a/f', 'bad//group', 'bad/other']: