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
6 changes: 4 additions & 2 deletions src/isolate/backends/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ def _decide_python(self) -> str:
_get_pyenv_executable()
except Exception:
raise EnvironmentCreationError(
f"Your local Python version {self.python_version} is not available in the app environment."
"Please either downgrade your local version of Python or use a Docker image with Python {self.python_version}."
f"Your local Python version {self.python_version} is not "
"available in the app environment. "
"Please either downgrade your local version of Python or use a Docker "
f"image with Python {self.python_version}."
) from None
else:
return self._install_python_through_pyenv()
Expand Down
6 changes: 5 additions & 1 deletion tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,11 @@ def test_invalid_python_version_raises(self, tmp_path, monkeypatch):
environment = self.get_environment(tmp_path, {"python_version": "9.9.9"})
with pytest.raises(
EnvironmentCreationError,
match="Python 9.9.9 is not available",
match=(
"Your local Python version 9.9.9 is not available in the app "
"environment. Please either downgrade your local version of "
"Python or use a Docker image with Python 9.9.9"
),
):
environment.create()

Expand Down
Loading