From f87e6cb7b98ed628669531bf7cc2af7746cf39e2 Mon Sep 17 00:00:00 2001 From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de> Date: Tue, 13 Jun 2023 16:14:07 +0200 Subject: [PATCH] add create_fake_env --- test_mpsd-software.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_mpsd-software.py b/test_mpsd-software.py index 70340fc..a18fb16 100644 --- a/test_mpsd-software.py +++ b/test_mpsd-software.py @@ -456,14 +456,14 @@ def create_fake_environment(tmp_path, mpsd_release, expected_toolchain_map=None) toolchain_lmod_folder = ( tmp_path / mpsd_release / microarch / "lmod" / "Core" / "toolchains" ) - toolchain_lmod_folder.mkdir(parents=True) + toolchain_lmod_folder.mkdir(parents=True, exist_ok=True) spack_folder = tmp_path / mpsd_release / microarch / "spack" - spack_folder.mkdir(parents=True) + spack_folder.mkdir(parents=True, exist_ok=True) for toolchain in expected_toolchain_map[microarch]: - toolchain_file = toolchain_lmod_folder / f"{toolchain}.lua" - toolchain_file.touch() + toolchain_lua_file = toolchain_lmod_folder / f"{toolchain}.lua" + toolchain_lua_file.touch() - # check that the environment status is correct + return expected_toolchain_map toolchain_map = mod.environment_status(mpsd_release, tmp_path) # convert each list to a set to ensure that the order doesn't matter for microarch in expected_toolchain_map.keys(): -- GitLab