Skip to content

Commit

Permalink
Switch from pip3 to pipx in JupyterLab tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matifali committed Sep 20, 2024
1 parent 65040e3 commit 035128d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions jupyterlab/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const executeScriptInContainerWithPip = async (
}> => {
const instance = findResourceInstance(state, "coder_script");
const id = await runContainer(image);
const respPip = await execContainer(id, [shell, "-c", "apk add py3-pip"]);
const respPipx = await execContainer(id, [shell, "-c", "apk add pipx"]);
const resp = await execContainer(id, [shell, "-c", instance.script]);
const stdout = resp.stdout.trim().split("\n");
const stderr = resp.stderr.trim().split("\n");
Expand All @@ -40,22 +40,22 @@ describe("jupyterlab", async () => {
agent_id: "foo",
});

it("fails without pip3", async () => {
it("fails without pipx", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
});
const output = await executeScriptInContainer(state, "alpine");
expect(output.exitCode).toBe(1);
expect(output.stdout).toEqual([
"\u001B[0;1mInstalling jupyterlab!",
"pip3 is not installed",
"Please install pip3 in your Dockerfile/VM image before running this script",
"pipx is not installed",
"Please install pipx in your Dockerfile/VM image before running this script",
]);
});

// TODO: Add faster test to run with pip3.
// TODO: Add faster test to run with pipx.
// currently times out.
// it("runs with pip3", async () => {
// it("runs with pipx", async () => {
// ...
// const output = await executeScriptInContainerWithPip(state, "alpine");
// ...
Expand Down

0 comments on commit 035128d

Please sign in to comment.