| ▲ | tybug 3 hours ago | |||||||
Yep, `#[derive(DefaultGenerator)]` and `generators::default<T>()` are the right tools here. This is one of the areas we've dogfooded the least, so we'd definitely be happy to get feedback on any sharp corners here! I think `from_type` is one of Hypothesis's most powerful and ergonomic strategies, and that while we probably can't get quite to that level in rust, we can still get something that's pretty great. | ||||||||
| ▲ | DRMacIver 37 minutes ago | parent | next [-] | |||||||
What do you think we're currently missing that Python's `from_type` has? I actually think the auto-deriving stuff we currently have in Rust is as good or better than from_type (e.g. it gets you the builder methods, has support for enums), but I've never been a heavy from_type user. | ||||||||
| ▲ | sunshowers 2 hours ago | parent | prev [-] | |||||||
Thank you! I have some particularly annoying proptest-based tests that I'll try porting over to Hegel soon. (Thanks for writing the Claude skill to do this.) | ||||||||
| ||||||||