-
Notifications
You must be signed in to change notification settings - Fork 586
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
Wrong data generation using dataclasses, Sequence and from_type #2257
Comments
|
I'm using hypothesis 4.50.6. But the issue is reproducible in master, commit 89d494d |
|
The issue seems to be in the implementation of >>> from_typing_type(Sequence[Item])
one_of(binary(), lists(elements=builds(Item)))which includes |
|
I found the underlying cause is that: |
|
I think >>> from_typing_type(Sequence)
one_of(binary(), lists(elements=text()))One may argue that if In Python we don't have a type for a single char and or byte; so it's difficult to express |
Hypothesis
from_typesometimes generates bytes when the dataclass has an attribute of typeSequence[X]:The text was updated successfully, but these errors were encountered: