File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -486,11 +486,11 @@ def test_toolchain_respects_relenv_data(
486486 relenv .common , "get_triplet" , lambda machine = None , plat = None : triplet
487487 )
488488
489- # Set RELENV_DATA and reload the module to pick up the new DATA_DIR
489+ # Set RELENV_DATA environment variable
490490 monkeypatch .setenv ("RELENV_DATA" , str (data_dir ))
491- import importlib
492491
493- importlib .reload (relenv .common )
492+ # Patch DATA_DIR to reflect the new RELENV_DATA value
493+ monkeypatch .setattr (relenv .common , "DATA_DIR" , data_dir )
494494
495495 # Verify toolchain_root_dir returns DATA_DIR/toolchain
496496 from relenv .common import toolchain_root_dir
@@ -520,11 +520,6 @@ def test_toolchain_uses_cache_without_relenv_data(
520520 # Set XDG_CACHE_HOME to control cache location
521521 monkeypatch .setenv ("XDG_CACHE_HOME" , str (tmp_path / ".cache" ))
522522
523- # Reload module to pick up environment changes
524- import importlib
525-
526- importlib .reload (relenv .common )
527-
528523 from relenv .common import toolchain_root_dir
529524
530525 result = toolchain_root_dir ()
You can’t perform that action at this time.
0 commit comments