Also for uv and poetry

This commit is contained in:
Reinier Criel 2025-12-05 10:01:55 -08:00
parent 85c4fcc96f
commit fc88120fdc
3 changed files with 7 additions and 4 deletions

View file

@ -16,6 +16,9 @@ describe("E2E: poetry coverage", () => {
const installationShell = await container.openShell("zsh"); const installationShell = await container.openShell("zsh");
await installationShell.runCommand("safe-chain setup --include-python"); await installationShell.runCommand("safe-chain setup --include-python");
// Clear poetry cache
await installationShell.runCommand("command poetry cache clear pypi --all -n");
}); });
afterEach(async () => { afterEach(async () => {
@ -29,9 +32,6 @@ describe("E2E: poetry coverage", () => {
it(`successfully installs known safe packages with poetry add`, async () => { it(`successfully installs known safe packages with poetry add`, async () => {
const shell = await container.openShell("zsh"); const shell = await container.openShell("zsh");
// Clear poetry cache using command to bypass safe-chain wrapper
await shell.runCommand("command poetry cache clear pypi --all -n");
// Initialize a new poetry project // Initialize a new poetry project
await shell.runCommand("mkdir /tmp/test-poetry-project && cd /tmp/test-poetry-project"); await shell.runCommand("mkdir /tmp/test-poetry-project && cd /tmp/test-poetry-project");
await shell.runCommand("cd /tmp/test-poetry-project && poetry init --no-interaction"); await shell.runCommand("cd /tmp/test-poetry-project && poetry init --no-interaction");

View file

@ -15,7 +15,7 @@ describe("E2E: safe-chain CLI python/pip support", () => {
// Note: We do NOT run 'safe-chain setup' here. // Note: We do NOT run 'safe-chain setup' here.
// We want to test the 'safe-chain' CLI command directly. // We want to test the 'safe-chain' CLI command directly.
// Clear pip cache before each test to ensure fresh downloads through proxy // Clear pip cache
const shell = await container.openShell("zsh"); const shell = await container.openShell("zsh");
await shell.runCommand("pip3 cache purge"); await shell.runCommand("pip3 cache purge");
}); });

View file

@ -16,6 +16,9 @@ describe("E2E: uv coverage", () => {
const installationShell = await container.openShell("zsh"); const installationShell = await container.openShell("zsh");
await installationShell.runCommand("safe-chain setup --include-python"); await installationShell.runCommand("safe-chain setup --include-python");
// Clear uv cache
await installationShell.runCommand("uv cache clean");
}); });
afterEach(async () => { afterEach(async () => {