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:
Aqua Security automated builds
2025-02-03 02:04:49 -07:00
committed by GitHub
parent 3fd8e2785b
commit 1741fddbe0
13 changed files with 1065 additions and 2199 deletions

View File

@@ -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",