Skip to content

Commit caf9aad

Browse files
committed
test: check for ErrCanceled
1 parent b05d43a commit caf9aad

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

starlark/eval_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,9 @@ func TestExecutionSteps(t *testing.T) {
12031203
if fmt.Sprint(err) != "Starlark computation canceled: too many steps" {
12041204
t.Errorf("execution returned error %q, want cancellation", err)
12051205
}
1206+
if !errors.Is(err, starlark.ErrCanceled) {
1207+
t.Errorf("exectution didn't return error starlark.ErrCanceled")
1208+
}
12061209

12071210
thread.Steps = 0
12081211
thread.Uncancel()

0 commit comments

Comments
 (0)