Closed pavoljuhas closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.83%. Comparing base (
51e8c3d
) to head (72217dc
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@maffoo - I have addressed all comments, let me know if anything else is needed.
When I checkout to this PR and do a fresh install of Cirq, I get test errors for hash_from_pickle_test
, do you know why that is?
FAILED cirq-core/cirq/protocols/hash_from_pickle_test.py::test_hash_from_pickle[/usr/local/google/home/smeeks/.virtualenvs/cirq-py3/lib/python3.11/site-packages/cirq_pasqal/json_test_data/PasqalDevice.json] - TypeError: unhashable type: 'list'
FAILED cirq-core/cirq/protocols/hash_from_pickle_test.py::test_hash_from_pickle[/usr/local/google/home/smeeks/.virtualenvs/cirq-py3/lib/python3.11/site-packages/cirq_rigetti/json_test_data/RigettiQCSAspenDevice.json] - TypeError: cannot pickle 'builtins.InstructionSetArchitecture' object
FAILED cirq-core/cirq/protocols/hash_from_pickle_test.py::test_hash_from_pickle[/usr/local/google/home/smeeks/.virtualenvs/cirq-py3/lib/python3.11/site-packages/cirq_google/json_test_data/cirq.google.QuantumExecutableGroup.json] - AssertionError: assert -1119203413633176159 == -1369517243038828412
FAILED cirq-core/cirq/protocols/hash_from_pickle_test.py::test_hash_from_pickle[/usr/local/google/home/smeeks/.virtualenvs/cirq-py3/lib/python3.11/site-packages/cirq_pasqal/json_test_data/PasqalVirtualDevice.json] - TypeError: unhashable type: 'list'
When I checkout to this PR and do a fresh install of Cirq, I get test errors for
hash_from_pickle_test
, do you know why that is?FAILED cirq-core/cirq/protocols/hash_from_pickle_test.py::test_hash_from_pickle[/usr/local/google/home/smeeks/.virtualenvs/cirq-py3/lib/python3.11/site-packages/cirq_pasqal/json_test_data/PasqalDevice.json] - TypeError: unhashable type: 'list' ...
Thanks for pointing that out!
The test seems to be using installed sources rather than those from source repository.
Please run the tests with check/pytest
which adjusts PYTHONPATH to use the repo sources.
(Alternatively, you can also source dev_tools/pypath
in the shell for the same effect.)
That said the test should also pass if run w/r to an installed cirq, e.g., for a fresh environment
pip install ./cirq-{aqt,core,google,ionq,pasqal,rigetti,web} ./
pip install -r dev_tools/requirements/deps/pytest.txt
pytest --pyargs cirq.protocols.hash_from_pickle_test
This was not working, because the test assumed data locations as in the Cirq repo, but they are different when installed to site-packages. This should be fixed with f26dab5d647560145392da0225dafb1ce8064d03.
Ensure cirq objects passed as pickles in multiprocessing calls work consistently in dictionaries just as the in-process created objects.
Partially resolves #6674