This repository was archived by the owner on Nov 17, 2025. It is now read-only.
Open
Conversation
This is a proof of concept for Hypothesis tests. I selected a test that was easy to convert and replaced the existing test with hard-coded values with a few tests that use Hypothesis. Since it was pretty easy to do, I also added tests for complex inputs. One thing I discovered is that cscalar doesn't work for any of the numpy functions. Hypothesis inevitably finds a value that can't be represented precisely and the test fails. All the functions work with zscalar. see: aesara-devs#197
Member
|
This looks great, thanks! Will review shortly. |
Remove unused imports and fix one formatting issue.
Author
Sounds good. Let me know what you think. It looks like I missed a few Black issues, so I fixed them (I hope) with this commit: fa832d4 |
| "cons", | ||
| "typing_extensions", | ||
| "setuptools >=48.0.0", | ||
| "hypothesis", |
Member
There was a problem hiding this comment.
You might need to add this to the test set up script (i.e. here).
Author
There was a problem hiding this comment.
I added it. I'm not sure how to test it, as I'm a little fuzzy on what this script is used for, but I guess we'll find out when something happens on GitHub. :^)
Add Hypothesis installation to test.yaml in the GitHub workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a proof of concept for Hypothesis tests. I selected a test that was easy to convert and replaced the existing test with hard-coded values with a few tests that use Hypothesis.
Since it was pretty easy to do, I also added tests for complex inputs. One thing I discovered is that cscalar doesn't work for any of the numpy functions. Hypothesis inevitably finds a value that can't be represented precisely and the test fails. All the functions work with zscalar.
see: #197
Thank you for opening a PR!
Here are a few important guidelines and requirements to check before your PR can be merged:
pre-commitis installed and set up.Don't worry, your PR doesn't need to be in perfect order to submit it. As development progresses and/or reviewers request changes, you can always rewrite the history of your feature/PR branches.
If your PR is an ongoing effort and you would like to involve us in the process, simply make it a draft PR.