Skip to content

Commit

Permalink
fix: support for pipenv with python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
gemaxim committed Aug 8, 2024
1 parent 7a5e48a commit 09df3bc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ commands:
parameters:
items:
type: string
default: go gradle python elixir composer gradle@6 maven sbt dotnet
default: go gradle python pipenv elixir composer gradle@6 maven sbt dotnet
steps:
- run:
name: Installing Rosetta
Expand Down
62 changes: 14 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"snyk-nuget-plugin": "2.7.4",
"snyk-php-plugin": "1.9.2",
"snyk-policy": "^1.25.0",
"snyk-python-plugin": "2.1.1",
"snyk-python-plugin": "2.2.1",
"snyk-resolve-deps": "4.7.3",
"snyk-sbt-plugin": "2.18.1",
"snyk-swiftpm-plugin": "1.4.1",
Expand Down
23 changes: 23 additions & 0 deletions test/jest/acceptance/snyk-test/basic-test-all-languages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,29 @@ describe('`snyk test` of basic projects for each language/ecosystem', () => {
expect(result.stderr).toMatch(wrongPythonCommand);
});

test('run `snyk test` on a pipenv project', async () => {
const project = await createProjectFromWorkspace('pipenv-app');
let pythonCommand = 'python';

await runCommand(pythonCommand, ['--version']).catch(function() {
pythonCommand = 'python3';
});

const pipenvResult = await runCommand('pipenv', ['install'], {
shell: true,
cwd: project.path(),
});

expect(pipenvResult.code).toEqual(0);

const result = await runSnykCLI('test -d --command=' + pythonCommand, {
cwd: project.path(),
env,
});

expect(result.code).toEqual(0);
});

test('run `snyk test` on a gradle project', async () => {
const project = await createProjectFromWorkspace('gradle-app');

Expand Down

0 comments on commit 09df3bc

Please sign in to comment.