mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-12-05 02:02:53 +00:00
fix(python): skip dev group's deps for poetry (#8106)
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
This commit is contained in:
1 parent
7558df7c22
commit
a034d26443
11 files changed
+650
-50
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package python_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aquasecurity/trivy/pkg/dependency/parser/python"
|
||||
)
|
||||
|
||||
func Test_NormalizePkgName(t *testing.T) {
|
||||
tests := []struct {
|
||||
pkgName string
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
pkgName: "SecretStorage",
|
||||
expected: "secretstorage",
|
||||
},
|
||||
{
|
||||
pkgName: "pywin32-ctypes",
|
||||
expected: "pywin32-ctypes",
|
||||
},
|
||||
{
|
||||
pkgName: "jaraco.classes",
|
||||
expected: "jaraco-classes",
|
||||
},
|
||||
{
|
||||
pkgName: "green_gdk",
|
||||
expected: "green-gdk",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.pkgName, func(t *testing.T) {
|
||||
assert.Equal(t, tt.expected, python.NormalizePkgName(tt.pkgName))
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user