From 8d88191badab08e659c99c66f7a905869f87acfb Mon Sep 17 00:00:00 2001 From: Mudit Pandey Date: Thu, 9 Jan 2025 15:31:45 -0500 Subject: [PATCH] Fix failing test --- tests/data/attributes/operator/test_operator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/data/attributes/operator/test_operator.py b/tests/data/attributes/operator/test_operator.py index 2c346b87977..d2e5be64ec6 100644 --- a/tests/data/attributes/operator/test_operator.py +++ b/tests/data/attributes/operator/test_operator.py @@ -156,7 +156,7 @@ class TestDatasetOperator: [ qml.RX(1.1, 0), qml.FermionicSWAP(1.3, [1, "a"]), - qml.Toffoli([1, "a", None]), + qml.Toffoli([1, "a", 2]), qml.Hamiltonian([], []), ], ) @@ -180,7 +180,7 @@ def test_value_init(self, attribute_cls, op_in): [ qml.RX(1.1, 0), qml.FermionicSWAP(1.3, [1, "a"]), - qml.Toffoli([1, "a", None]), + qml.Toffoli([1, "a", 2]), qml.Hamiltonian([], []), ], ) @@ -237,8 +237,6 @@ def test_value_init_not_supported(): class NotSupported(Operator): # pylint: disable=too-few-public-methods, unnecessary-ellipsis """An operator.""" - ... - with pytest.raises( TypeError, match="Serialization of operator type 'NotSupported' is not supported" ):