Skip to content

Bound test_full fill values to default dtypes #31

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

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

honno
Copy link
Member

@honno honno commented Oct 21, 2021

Currently our test suite can fail for test_full (depending on the Hypothesis seed or max examples) because I didn't bound fill_value generation to the bounds of the default dtypes. This PR fixes that by inferring the default int and float in dtype_helpers, and using that to prevent passing dtypes with values that cannot be represented by the default dtypes.

This should be useful for the future too.

@asmeurer
Copy link
Member

Looks good. It would be nice if we had a library that defaulted to float32 to test this against. Does NumPy default to 32-bit types when compiled 32-bit?

@asmeurer asmeurer merged commit 07b4081 into data-apis:master Oct 21, 2021
@honno honno deleted the safe-test-full branch February 8, 2022 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants