Skip to content

Commit

Permalink
Update test_templates.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KetpuntoG committed Jul 25, 2024
1 parent f2f3efc commit a7ad726
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/capture/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ def enable_disable_plxpr():
),
]

@pytest.fixture(scope="function", autouse=True)
def capture_warnings(recwarn):
yield
if len(recwarn) > 0:
for w in recwarn:
assert isinstance(w.message, qml.PennyLaneDeprecationWarning)
assert "BasisStatePreparation is deprecated" in str(w.message)

@pytest.mark.parametrize("template, args, kwargs", unmodified_templates_cases)
def test_unmodified_templates(template, args, kwargs):
Expand Down

0 comments on commit a7ad726

Please sign in to comment.