Commit e3797bb1 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Kamil Kisiel

tests/BenchmarkDecode: Skip empty pickles from tests table

In 06e06939 (encoder: Allow to specify pickle protocol version) I added
ability to add to tests error cases - object inputs that on encoding
should produce error.

For decoding we should skip those cases as there pickle.data = "", and
if not skipped it leads to

	--- FAIL: BenchmarkDecode
	    ogorek_test.go:803: unexpected # of decode steps: got 100  ; want 102
parent 6daa7b2c
......@@ -773,6 +773,9 @@ func BenchmarkDecode(b *testing.B) {
npickle := 0
for _, test := range tests {
for _, pickle := range test.picklev {
if pickle.err != nil {
continue
}
// not prepending `PROTO <ver>` - decoder should be
// able to decode without it.
input = append(input, pickle.data...)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment