Skip to content

Commit 0868b6d

Browse files
fix: inherit env in test subprocess for CI compatibility
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fb1fbe2 commit 0868b6d

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: uv sync
3333

3434
- name: Run tests
35-
run: uv run pytest
35+
run: uv run pytest -v --tb=short
3636

3737
lint:
3838
name: Lint code

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: uv sync
3838

3939
- name: Run tests
40-
run: uv run pytest
40+
run: uv run pytest -v --tb=short
4141

4242
version:
4343
name: Bump version and create tag

tests/test_integration_claude.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import json
4+
import os
45
import re
56
import subprocess
67
import sys
@@ -16,7 +17,8 @@ def _encode_path(p: Path) -> str:
1617

1718

1819
def _run_cli(args: list[str], cwd: Path | None = None) -> subprocess.CompletedProcess[str]:
19-
env = {"PYTHONPATH": str(ROOT / "src"), "NO_COLOR": "1"}
20+
env = os.environ.copy()
21+
env.update({"PYTHONPATH": str(ROOT / "src"), "NO_COLOR": "1"})
2022
return subprocess.run(
2123
[sys.executable, "-m", "convx_ai", *args],
2224
cwd=str(cwd or ROOT),

tests/test_integration_sync.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import os
34
import re
45
import subprocess
56
import sys
@@ -12,7 +13,8 @@
1213

1314

1415
def _run_cli(args: list[str], cwd: Path | None = None) -> subprocess.CompletedProcess[str]:
15-
env = {"PYTHONPATH": str(ROOT / "src"), "NO_COLOR": "1"}
16+
env = os.environ.copy()
17+
env.update({"PYTHONPATH": str(ROOT / "src"), "NO_COLOR": "1"})
1618
return subprocess.run(
1719
[sys.executable, "-m", "convx_ai", *args],
1820
cwd=str(cwd or ROOT),

0 commit comments

Comments
 (0)