File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,9 @@ def _clean_location(self) -> bool:
515
515
and self ._check_reused_environment_interpreter ()
516
516
):
517
517
return False
518
- shutil .rmtree (self .location , ignore_errors = True )
518
+ # uv clears it for us, and it balks at files left around
519
+ if self .venv_backend != "uv" :
520
+ shutil .rmtree (self .location , ignore_errors = True )
519
521
return True
520
522
521
523
def _read_pyvenv_cfg (self ) -> dict [str , str ] | None :
Original file line number Diff line number Diff line change @@ -304,6 +304,9 @@ def test_uv_creation(
304
304
venv .create ()
305
305
assert venv ._check_reused_environment_type ()
306
306
307
+ venv .create ()
308
+ assert venv ._check_reused_environment_type ()
309
+
307
310
308
311
@has_uv
309
312
def test_uv_managed_python (
You can’t perform that action at this time.
0 commit comments