Skip to content

Commit 94bbcd7

Browse files
committed
test: make cross-platform checks portable
1 parent 0eeb8f1 commit 94bbcd7

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

store/store_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ func TestReadOnlyRejectsWrites(t *testing.T) {
103103
func TestOpenEscapesURIReservedPathCharacters(t *testing.T) {
104104
ctx := context.Background()
105105
dir := t.TempDir()
106-
path := filepath.Join(dir, "archive?tenant=a#frag.db")
106+
name := "archive?tenant=a#frag.db"
107+
if runtime.GOOS == "windows" {
108+
name = "archive#frag.db"
109+
}
110+
path := filepath.Join(dir, name)
107111
st, err := Open(ctx, Options{
108112
Path: path,
109113
Schema: `create table things(id text primary key, value text not null);`,

vector/search_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,10 @@ func TestRunTurboVecLimitsAndErrors(t *testing.T) {
194194
}
195195

196196
func TestTurboVecDefaultCommandUsesSafePythonMode(t *testing.T) {
197-
command, defaultCommand, err := turboVecCommand(TurboVecOptions{Python: "/usr/bin/python3"})
197+
python := filepath.Join(t.TempDir(), "python3")
198+
command, defaultCommand, err := turboVecCommand(TurboVecOptions{Python: python})
198199
require.NoError(t, err)
199-
require.Equal(t, []string{"/usr/bin/python3", "-E", "-c", turboVecBridgeScript}, command)
200+
require.Equal(t, []string{python, "-E", "-c", turboVecBridgeScript}, command)
200201
require.Equal(t, true, defaultCommand)
201202
}
202203

0 commit comments

Comments
 (0)