Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/autoupdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def read_python_version() -> str | None:
def start_proc(config: Path) -> subprocess.Popen:
py_ver = read_python_version()
if py_ver:
subprocess.run(["uv", "venv", "--python", py_ver], check=True)
subprocess.run(["uv", "venv", "--python", py_ver, "--clear"], check=True)
else:
subprocess.run(["uv", "venv"], check=True)
subprocess.run(["uv", "venv", "--clear"], check=True)

# Install project in dev mode into the venv.
subprocess.run(["uv", "pip", "install", ".[dev]"], check=True)
Expand Down
4 changes: 2 additions & 2 deletions tests/scripts/test_autoupdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_start_proc_with_version(mocker):
autoupdater.read_python_version.assert_called_once()
mock_run.assert_has_calls(
[
mock.call(["uv", "venv", "--python", "3.11.9"], check=True),
mock.call(["uv", "venv", "--python", "3.11.9", "--clear"], check=True),
mock.call(["uv", "pip", "install", ".[dev]"], check=True),
]
)
Expand All @@ -55,7 +55,7 @@ def test_start_proc_without_version(mocker):
autoupdater.read_python_version.assert_called_once()
mock_run.assert_has_calls(
[
mock.call(["uv", "venv"], check=True),
mock.call(["uv", "venv", "--clear"], check=True),
mock.call(["uv", "pip", "install", ".[dev]"], check=True),
]
)
Expand Down