Skip to content
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

Ghostwriter: create @composite strategy from type #3964

Closed
cleder opened this issue May 2, 2024 · 1 comment
Closed

Ghostwriter: create @composite strategy from type #3964

cleder opened this issue May 2, 2024 · 1 comment
Labels
opinions-sought tell us what you think about these ones!

Comments

@cleder
Copy link

cleder commented May 2, 2024

Writing composite strategies is a bit of a chore.
The hypothesis.strategies.from_type is great, but to customize it is a bit complex.

It would be great if one could generate composite strategies sourcecode from a type.
(this also may be a workaround for #2876 )

@Zac-HD
Copy link
Member

Zac-HD commented May 3, 2024

Can you show some examples of what you think Ghostwriter could output, and how you'd build on that?

I'd expect st.builds(T, ...) to work pretty well in most cases; you only need @st.composite if there are dependencies between arguments.

@Zac-HD Zac-HD added the opinions-sought tell us what you think about these ones! label May 3, 2024
@Zac-HD Zac-HD closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opinions-sought tell us what you think about these ones!
Projects
None yet
Development

No branches or pull requests

2 participants