tests/utils/python/tjson.py: print actual type when a type error occurs
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 12 Feb 2024 19:01:28 +0000 (14:01 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 19 Feb 2024 18:10:15 +0000 (13:10 -0500)
commite45fa35b841ef375a2911ff89f19c8dd68dcaec6
treeaf5ca2acf401265db85625c6c337e68857b775b0
parent5758ab8b0cd073ba9030463d53b9b03df3862835
tests/utils/python/tjson.py: print actual type when a type error occurs

Make `_check_type` output the actual type in addition to the expected
type.  Example:

    Before: # TypeError: `.[0]."cond-id"`: expecting a string value
    After:  # TypeError: `.[0]."cond-id"`: expecting a string value, got an array

Change-Id: I9615aa380b12fe5e7fd65b079840b779f9530f3a
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11781
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
tests/utils/python/tjson.py
This page took 0.024671 seconds and 4 git commands to generate.