mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-05 02:45:28 +00:00
Some checks failed
CI / Focused test guidance (report-only) (push) Has been cancelled
CI / Python syntax (compileall) (push) Has been cancelled
CI / JS syntax (node --check) (push) Has been cancelled
CI / Python tests (pytest) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Container scan / hadolint (Dockerfile lint) (push) Has been cancelled
Container scan (Trivy) / Trivy (image scan, advisory) (push) Has been cancelled
Container scan (Trivy) / Trivy (image scan + SARIF upload) (push) Has been cancelled
Dependency review / dependency-review (PR gate) (push) Has been cancelled
Dependency review / pip-audit (advisory) (push) Has been cancelled
ci / docker publish / build (amd64) (push) Has been cancelled
ci / docker publish / build (arm64) (push) Has been cancelled
Secret scan / gitleaks (push) Has been cancelled
Workflow security / actionlint (push) Has been cancelled
Workflow security / zizmor (Actions SAST) (push) Has been cancelled
ci / docker publish / merge manifest + tag (push) Has been cancelled
22 lines
657 B
Python
22 lines
657 B
Python
import os
|
|
|
|
from src.builtin_mcp import builtin_python_env
|
|
|
|
|
|
def test_builtin_python_env_preserves_existing_pythonpath(monkeypatch):
|
|
monkeypatch.setenv(
|
|
"PYTHONPATH",
|
|
os.pathsep.join(["/app/venv/lib/python3.13/site-packages", "/app", "/extra"]),
|
|
)
|
|
|
|
env = builtin_python_env("/app")
|
|
|
|
assert env == {
|
|
"PYTHONPATH": os.pathsep.join(["/app", "/app/venv/lib/python3.13/site-packages", "/extra"])
|
|
}
|
|
|
|
|
|
def test_builtin_python_env_uses_app_root_without_existing_pythonpath(monkeypatch):
|
|
monkeypatch.delenv("PYTHONPATH", raising=False)
|
|
|
|
assert builtin_python_env("/srv/odysseus") == {"PYTHONPATH": "/srv/odysseus"}
|