mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 07:29:00 -08:00
fix(python): add poetry v2 support [backport: release/v0.59] (#8335)
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com> Co-authored-by: Nikita Pivkin <nikita.pivkin@smartforce.io>
This commit is contained in:
committed by
GitHub
parent
3fd8e2785b
commit
1741fddbe0
@@ -45,6 +45,32 @@ func TestParser_Parse(t *testing.T) {
|
||||
},
|
||||
wantErr: assert.NoError,
|
||||
},
|
||||
{
|
||||
name: "happy path v2",
|
||||
file: "testdata/happy_v2.toml",
|
||||
want: pyproject.PyProject{
|
||||
Project: pyproject.Project{
|
||||
Dependencies: pyproject.Dependencies{
|
||||
Set: set.New[string]("check-wheel-contents", "flask", "pluggy"),
|
||||
},
|
||||
},
|
||||
Tool: pyproject.Tool{
|
||||
Poetry: pyproject.Poetry{
|
||||
Dependencies: pyproject.Dependencies{
|
||||
Set: set.New[string]("annotated-types", "python"),
|
||||
},
|
||||
Groups: map[string]pyproject.Group{
|
||||
"dev": {
|
||||
Dependencies: pyproject.Dependencies{
|
||||
Set: set.New[string]("pytest"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
wantErr: assert.NoError,
|
||||
},
|
||||
{
|
||||
name: "sad path",
|
||||
file: "testdata/sad.toml",
|
||||
|
||||
Reference in New Issue
Block a user