tests/utils/python/tjson.py: print actual type when a type error occurs
[babeltrace.git] / tests / utils / python / tjson.py
index 02a2ca211f2d288eb401c899922020e4750e629f..59a5a1c48e1271c693c08b15dadf8cfbf56f2a98 100644 (file)
@@ -219,8 +219,10 @@ class ObjVal(Val, Mapping[str, Val]):
 def _check_type(val: Val, expected_type: Type[Val]):
     if not isinstance(val, expected_type):
         raise TypeError(
-            "`{}`: expecting {} value".format(
-                val.path, expected_type._name  # pyright: ignore [reportPrivateUsage]
+            "`{}`: expecting {} value, got {}".format(
+                val.path,
+                expected_type._name,  # pyright: ignore [reportPrivateUsage]
+                type(val)._name,  # pyright: ignore [reportPrivateUsage]
             )
         )
 
This page took 0.023255 seconds and 4 git commands to generate.