From 8188231a8fda0c59b61867360622ea78738df8fd Mon Sep 17 00:00:00 2001 From: lillian542 Date: Wed, 3 Apr 2024 17:01:20 -0400 Subject: [PATCH] sanity check that tests are running as expected --- tests/test_operation.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_operation.py b/tests/test_operation.py index b473f4c5b39..f0fa8ecf334 100644 --- a/tests/test_operation.py +++ b/tests/test_operation.py @@ -46,6 +46,18 @@ I_broadcasted = I[pnp.newaxis] +def test_that_opmath_is_enabled(): + """Confirm that the tests are running by default with new_opmath enabled""" + if not qml.operation.active_new_opmath(): + raise RuntimeError + + +def test_that_opmath_is_disabled(): + """Confirm that the tests are running by default with new_opmath disabled""" + if qml.operation.active_new_opmath(): + raise RuntimeError + + class TestOperatorConstruction: """Test custom operators' construction."""