fix: improved Python binary detection (#1648)

This commit is contained in:
Keith Zantow
2023-03-07 10:52:29 -05:00
committed by GitHub
parent 096d2b7bff
commit 7714bc0521
15 changed files with 299 additions and 100 deletions
+2 -4
View File
@@ -67,10 +67,8 @@ func Test_ClassifierCPEs(t *testing.T) {
locations, err := resolver.FilesByPath(test.fixture)
require.NoError(t, err)
require.Len(t, locations, 1)
location := locations[0]
readCloser, err := resolver.FileContentsByLocation(location)
require.NoError(t, err)
pkgs, err := test.classifier.EvidenceMatcher(test.classifier, source.NewLocationReadCloser(location, readCloser))
pkgs, err := test.classifier.EvidenceMatcher(resolver, test.classifier, locations[0])
require.NoError(t, err)
require.Len(t, pkgs, 1)