File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -295,12 +295,22 @@ def test_tarantool_decode(self):
295
295
296
296
# Tarantool error file and line could differ even between
297
297
# different patches.
298
+ #
299
+ # Also, in Tarantool errors are not comparable at all.
300
+ #
301
+ # tarantool> msgpack.decode(error_str) == msgpack.decode(error_str)
302
+ # ---
303
+ # - false
304
+ # ...
305
+
298
306
self .assertEqual (res [0 ][0 ], case ['str_type' ](name ))
299
307
self .assertEqual (res [0 ][2 ], case ['str_type' ]('payload' ))
300
308
301
- self .assertTrue (isinstance (res [0 ][1 ], tarantool .BoxError ))
302
-
303
309
err = res [0 ][1 ]
310
+ self .assertTrue (
311
+ isinstance (err , tarantool .BoxError ),
312
+ f'{ err } is expected to be a BoxError object' )
313
+
304
314
expected_err = case ['python' ]
305
315
while err is not None :
306
316
self .assertEqual (err .type , expected_err .type )
@@ -341,12 +351,6 @@ def test_tarantool_encode(self):
341
351
local tuple = box.space['test']:get('{ name } ')
342
352
assert(tuple ~= nil)
343
353
344
- -- Tarantool errors are not comparable at all.
345
- --
346
- -- tarantool> msgpack.decode(error_str) == msgpack.decode(error_str)
347
- -- ---
348
- -- - false
349
- -- ...
350
354
351
355
local tuple_err = tuple[2]
352
356
You can’t perform that action at this time.
0 commit comments