-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Migrate contrib json tests to standard json test framework #7743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate contrib json tests to standard json test framework #7743
Conversation
pavoljuhas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after pushing in few small tweaks.
Thank you for taking care of this!
The gate has mutable attributes. Make it unhashable to avoid failure in `hash_from_pickle_test.py`. Support for hashing can be added later if necessary.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7743 +/- ##
=======================================
Coverage 99.38% 99.38%
=======================================
Files 1091 1090 -1
Lines 97919 97920 +1
=======================================
+ Hits 97313 97314 +1
Misses 606 606 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @pavoljuhas Thank you for the tweaks and letting me contribute to the repo! A quick doubt on why we are adding @value.value_equality(unhashable=True) in cirq-core/cirq/contrib/bayesian_network/bayesian_network_gate.py? |
To avoid failure of hash_from_pickle_test.py such as here. That test reuses the list of JSON-tested classes to verify consistency of their |
Fixes #7520