Public Access
DEVX-17: fix: pass --break-system-packages to pip in CI environments
Post-merge / detect-type (push) Successful in 9s
Post-merge / validate-commit-msg (push) Successful in 11s
Post-merge / configure-repo (push) Successful in 10s
Post-merge / release (push) Successful in 45s
Post-merge / vikunja (push) Successful in 14s
Post-merge / sync-wiki (push) Successful in 38s
Post-merge / badges (push) Successful in 41s
Post-merge / detect-type (push) Successful in 9s
Post-merge / validate-commit-msg (push) Successful in 11s
Post-merge / configure-repo (push) Successful in 10s
Post-merge / release (push) Successful in 45s
Post-merge / vikunja (push) Successful in 14s
Post-merge / sync-wiki (push) Successful in 38s
Post-merge / badges (push) Successful in 41s
This commit was merged in pull request #30.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""Unit tests for devx.tools.setup."""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from unittest.mock import MagicMock, patch
|
||||
@@ -47,6 +48,12 @@ class TestInstallPythonDeps:
|
||||
_install_python_deps(".venv/bin", "ci,lint")
|
||||
mock_run.assert_called_once_with([".venv/bin/pip", "install", "-e", ".[ci,lint]"])
|
||||
|
||||
@patch("devx.tools.setup._run")
|
||||
def test_install_with_break_system_packages(self, mock_run: MagicMock) -> None:
|
||||
with patch.dict(os.environ, {"PIP_BREAK_SYSTEM_PACKAGES": "1"}):
|
||||
_install_python_deps(".venv/bin", "ci")
|
||||
mock_run.assert_called_once_with([".venv/bin/pip", "install", "-e", ".[ci]", "--break-system-packages"])
|
||||
|
||||
|
||||
class TestInstallPreCommitHooks:
|
||||
@patch("devx.tools.setup._run")
|
||||
|
||||
Reference in New Issue
Block a user