diff --git a/CHANGELOG.md b/CHANGELOG.md index c8636c956..fdf31f80b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed test cases to adapt changes to SQLAlchemy version 1.4.49 - Ignored remote file transfer how-to functional tests. - Skipping a UI backend test for now +- Fixed `test_decorated_function` test case in functional tests ### Fixed diff --git a/tests/functional_tests/workflow_stack_test.py b/tests/functional_tests/workflow_stack_test.py index fd2b0c438..433e1efce 100644 --- a/tests/functional_tests/workflow_stack_test.py +++ b/tests/functional_tests/workflow_stack_test.py @@ -474,22 +474,20 @@ def test_decorated_function(): Test whether covalent works as intended on an already decorated function. """ - import pennylane as qml + def wrapper(func): + def inner(*args, **kwargs): + return func(*args, **kwargs) - import covalent as ct - - dev1 = qml.device("default.qubit", wires=1) + return inner @ct.electron - @qml.qnode(dev1) - def circuit(params): - qml.RX(params[0], wires=0) - qml.RY(params[1], wires=0) - return qml.expval(qml.PauliZ(0)) + @wrapper + def task(x): + return x**2 @ct.lattice def workflow(): - return circuit([0.54, 0.12]) + return task(x=5) dispatch_id = ct.dispatch(workflow)() workflow_result = rm.get_result(dispatch_id, wait=True)