Unit test for `qcnn` fails with update in Python version to 3.12
Closed this issue · 1 comments
SaashaJoshi commented
Python 3.12 doesn't accept the called_once_with()
method.
piQture/tests/neural_networks/test_qcnn.py
Lines 124 to 129 in 17bd2e6
Refer #50
SaashaJoshi commented
While mocking instantiation of any method or class, one must also specify the return value. This was missing from the earlier versions of the test_qcnn.py
file.
Another important note, while mocking classes that are only instantiated, one needs to mock the __init__
method.