@@ -160,7 +160,7 @@ def test_get_toolchain(tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
160160 data_dir = tmp_path / "data"
161161 triplet = "aarch64-linux-gnu"
162162 monkeypatch .setattr (relenv .common , "DATA_DIR" , data_dir , raising = False )
163- monkeypatch .setattr (relenv . common . sys , "platform" , "linux" , raising = False )
163+ monkeypatch .setattr (sys , "platform" , "linux" )
164164 monkeypatch .setattr (
165165 relenv .common , "get_triplet" , lambda machine = None , plat = None : triplet
166166 )
@@ -178,7 +178,7 @@ def test_get_toolchain_linux_existing(tmp_path: pathlib.Path) -> None:
178178 toolchain_path = data_dir / "toolchain" / triplet
179179 toolchain_path .mkdir (parents = True )
180180 with patch ("relenv.common.DATA_DIR" , data_dir ), patch (
181- "relenv.common. sys.platform" , "linux"
181+ "sys.platform" , "linux"
182182 ), patch ("relenv.common.get_triplet" , return_value = triplet ), patch .dict (
183183 os .environ ,
184184 {"RELENV_TOOLCHAIN_CACHE" : str (data_dir / "toolchain" )},
@@ -193,7 +193,7 @@ def test_get_toolchain_no_arch(
193193 data_dir = tmp_path / "data"
194194 triplet = "x86_64-linux-gnu"
195195 monkeypatch .setattr (relenv .common , "DATA_DIR" , data_dir , raising = False )
196- monkeypatch .setattr (relenv . common . sys , "platform" , "linux" , raising = False )
196+ monkeypatch .setattr (sys , "platform" , "linux" )
197197 monkeypatch .setattr (
198198 relenv .common , "get_triplet" , lambda machine = None , plat = None : triplet
199199 )
@@ -445,7 +445,7 @@ def test_sanitize_sys_path_with_editable_paths(tmp_path: pathlib.Path) -> None:
445445
446446
447447def test_makepath_oserror () -> None :
448- with patch ("relenv.common. os.path.abspath" , side_effect = OSError ):
448+ with patch ("os.path.abspath" , side_effect = OSError ):
449449 result , case = makepath ("foo" , "Bar" )
450450 expected = os .path .join ("foo" , "Bar" )
451451 assert result == expected
0 commit comments