We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
errors.Is
1 parent cad3959 commit 2f1ef70Copy full SHA for 2f1ef70
pkg/lockfile/parse-pylock_test.go
@@ -1,6 +1,8 @@
1
package lockfile_test
2
3
import (
4
+ "errors"
5
+ "os"
6
"testing"
7
8
"github.com/g-rath/osv-detector/pkg/lockfile"
@@ -11,7 +13,9 @@ func TestParsePylock_FileDoesNotExist(t *testing.T) {
11
13
12
14
packages, err := lockfile.ParsePylock("testdata/pylock/does-not-exist")
15
- expectErrContaining(t, err, "could not read")
16
+ if !errors.Is(err, os.ErrNotExist) {
17
+ t.Errorf("expected \"%v\" error but got \"%v\"", os.ErrNotExist, err)
18
+ }
19
expectPackages(t, packages, []lockfile.PackageDetails{})
20
}
21
0 commit comments