Skip to content

Commit

Permalink
fix DeepSource issue: Empty string test can be improved
Browse files Browse the repository at this point in the history
Signed-off-by: datelier <[email protected]>
  • Loading branch information
datelier authored and actions-user committed Jul 9, 2020
1 parent 722a9a9 commit ba92ef5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/core/converter/tensorflow/option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ func TestWithLoadFunc(t *testing.T) {
cmp.AllowUnexported(OutputSpec{}),
cmpopts.IgnoreFields(tensorflow{}, "loadFunc"),
}
if diff := cmp.Diff(w.obj, obj, opts...); len(diff) != 0 {
if diff := cmp.Diff(w.obj, obj, opts...); diff != "" {
return errors.Errorf("err: %s", diff)
}
opt := cmp.Comparer(func(want, obj T) bool {
Expand Down
2 changes: 1 addition & 1 deletion internal/core/converter/tensorflow/tensorflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestNew(t *testing.T) {
cmp.AllowUnexported(OutputSpec{}),
cmpopts.IgnoreFields(tensorflow{}, "loadFunc"),
}
if diff := cmp.Diff(w.want, got, opts...); len(diff) != 0 {
if diff := cmp.Diff(w.want, got, opts...); diff != "" {
return errors.Errorf("err: %s", diff)
}
opt := cmp.Comparer(func(want, got TF) bool {
Expand Down

0 comments on commit ba92ef5

Please sign in to comment.