diff --git a/mlir/test/Bindings/Python/ir_attributes.py b/mlir/test/Bindings/Python/ir_attributes.py --- a/mlir/test/Bindings/Python/ir_attributes.py +++ b/mlir/test/Bindings/Python/ir_attributes.py @@ -371,7 +371,7 @@ try: ArrayAttr.get([42]) except RuntimeError as e: - # CHECK: Error: Invalid attribute when attempting to create an ArrayAttribute (Unable to cast Python instance of type to C++ type 'mlir::python::PyAttribute') + # CHECK: Error: Invalid attribute when attempting to create an ArrayAttribute print("Error: ", e) run(testArrayAttr) diff --git a/mlir/test/Bindings/Python/ir_operation.py b/mlir/test/Bindings/Python/ir_operation.py --- a/mlir/test/Bindings/Python/ir_operation.py +++ b/mlir/test/Bindings/Python/ir_operation.py @@ -566,17 +566,17 @@ try: Operation.create("module", attributes={None:StringAttr.get("name")}) except Exception as e: - # CHECK: Invalid attribute key (not a string) when attempting to create the operation "module" (Unable to cast Python instance of type to C++ type + # CHECK: Invalid attribute key (not a string) when attempting to create the operation "module" print(e) try: Operation.create("module", attributes={42:StringAttr.get("name")}) except Exception as e: - # CHECK: Invalid attribute key (not a string) when attempting to create the operation "module" (Unable to cast Python instance of type to C++ type + # CHECK: Invalid attribute key (not a string) when attempting to create the operation "module" print(e) try: Operation.create("module", attributes={"some_key":ctx}) except Exception as e: - # CHECK: Invalid attribute value for the key "some_key" when attempting to create the operation "module" (Unable to cast Python instance of type to C++ type 'mlir::python::PyAttribute') + # CHECK: Invalid attribute value for the key "some_key" when attempting to create the operation "module" print(e) try: Operation.create("module", attributes={"some_key":None})