Skip to content

Commit 4564777

Browse files
improve output
1 parent 580526a commit 4564777

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/suites/test_error_ext.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,22 @@ def test_tarantool_decode(self):
295295

296296
# Tarantool error file and line could differ even between
297297
# 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+
298306
self.assertEqual(res[0][0], case['str_type'](name))
299307
self.assertEqual(res[0][2], case['str_type']('payload'))
300308

301-
self.assertTrue(isinstance(res[0][1], tarantool.BoxError))
302-
303309
err = res[0][1]
310+
self.assertTrue(
311+
isinstance(err, tarantool.BoxError),
312+
f'{err} is expected to be a BoxError object')
313+
304314
expected_err = case['python']
305315
while err is not None:
306316
self.assertEqual(err.type, expected_err.type)
@@ -341,12 +351,6 @@ def test_tarantool_encode(self):
341351
local tuple = box.space['test']:get('{name}')
342352
assert(tuple ~= nil)
343353
344-
-- Tarantool errors are not comparable at all.
345-
--
346-
-- tarantool> msgpack.decode(error_str) == msgpack.decode(error_str)
347-
-- ---
348-
-- - false
349-
-- ...
350354
351355
local tuple_err = tuple[2]
352356

0 commit comments

Comments
 (0)