diff --git a/tests/ops/functions/test_equal.py b/tests/ops/functions/test_equal.py index 5b9b3f08aae..1b8802d6e8c 100644 --- a/tests/ops/functions/test_equal.py +++ b/tests/ops/functions/test_equal.py @@ -1481,7 +1481,7 @@ def test_tensors_not_equal(self): """Tensors are not equal because of different observable data""" op1 = qml.operation.Tensor(qml.X(0), qml.Y(1)) op2 = qml.operation.Tensor(qml.Y(0), qml.X(1)) - with pytest.raises(AssertionError, match="op1 and op2 have different _obs_data outputs"): + with pytest.raises(AssertionError, match="have different _obs_data outputs"): assert_equal(op1, op2) @pytest.mark.parametrize(("H", "T", "res"), equal_hamiltonians_and_tensors)