Skip to content

Commit efa2c8b

Browse files
Skip default-runner test when uv is absent (#4)
The typed-selection test drives the real pytest-via-uv runner; without uv the run is env-blocked (ERRORED, "Tests: 0 passed") rather than a genuine failure. Guard it with a uv LookPath skip, matching the python3/ruff skips already used across the suite, so `go test ./...` is green on runners that lack uv. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 645a94b commit efa2c8b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎pkg/runtime/runtime_test.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package runtime_test
33
import (
44
"context"
55
"os"
6+
"os/exec"
67
"path/filepath"
78
"testing"
89

@@ -63,6 +64,9 @@ func TestRuntimeInitDoesNotMutateSourceCheckout(t *testing.T) {
6364
// workspace uses the real default runner, runs only the selected case, and
6465
// returns the structured acknowledgement even though the selected test fails.
6566
func TestRuntimeHonorsTypedSelectionWithDefaultRunner(t *testing.T) {
67+
if _, err := exec.LookPath("uv"); err != nil {
68+
t.Skip("uv is not installed")
69+
}
6670
dir := t.TempDir()
6771
content := "import unittest\n\n\nclass CalculatorTests(unittest.TestCase):\n def test_selected_failure(self):\n self.assertEqual(1, 2)\n\n def test_unselected_pass(self):\n self.assertEqual(2, 2)\n"
6872
if err := os.WriteFile(filepath.Join(dir, "test_calc.py"), []byte(content), 0o644); err != nil {

0 commit comments

Comments
 (0)