fix: default bridge and tests to project venv Python
Use .venv/bin/python3 by default, with PYTHON_PATH as an override, and update the setup script and docs to match the new virtualenv-based workflow.
This commit is contained in:
@@ -26,7 +26,8 @@ const FIXTURE_PATH = "tests/fixtures/data.kdbx";
|
||||
const FIXTURE_DATA_PATH = "tests/fixtures/data.kdbx.json";
|
||||
|
||||
async function ensurePyKeePass(): Promise<boolean> {
|
||||
const child = Bun.spawn(["python3", "-c", "import pykeepass; print('ok')"], {
|
||||
const python = process.env.PYTHON_PATH ?? ".venv/bin/python3";
|
||||
const child = Bun.spawn([python, "-c", "import pykeepass; print('ok')"], {
|
||||
stdout: "pipe",
|
||||
stderr: "pipe",
|
||||
});
|
||||
@@ -95,7 +96,7 @@ test("lists the groups from the bundled data fixture", async () => {
|
||||
}
|
||||
|
||||
const db = openKeePassDatabase(FIXTURE_PATH, { password });
|
||||
const groups = await db.listGroups();
|
||||
const groups = await db.listGroups();
|
||||
expect(groups).toEqual([
|
||||
{ name: "Racine", path: "" },
|
||||
{ name: "Folder1", path: "Folder1" },
|
||||
@@ -145,4 +146,3 @@ test("uses the JSON fixture content as the source of truth for expectations", as
|
||||
"\t\t- f2-item1",
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user