-
Notifications
You must be signed in to change notification settings - Fork 1
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
Handling failing tests idea #10
Comments
I think at the very least we should provide support for these types of tests. Testing is a bit annoying right now to be honest, always having to unwrap and carefully handle the error type. However, I think we do need to carefully consider the backend implementation: minithesis relies heavily upon the exception mechanism of Python, and I think that's something you don't want to see in Rust. I've made sure all exceptions are proper Err values, but I'm sure the architecture could be improved. So yes, but don't use this type of exception catching tactic for the implementation. |
Alright time to do some writing-as-thought here. Apologies if nothing in this comment makes sense, then I didn't finish my line of thought. The internal architecture of Minithesis is basically as follows. What irks me about the current implementation most is that we are first setting some status code and then returning an error. We use this error in Python to get control back up the call stack, but in the Rust case this is not how we do things. Rather, we use I'll try having a go at that tomorrow, maybe. |
Okay that's mostly done seems like, just hunting bugs at this point. Think we're already good to go for the proc macro! |
I was thinking about the API for tests and probably it would be nice to keep the test function as close to regular tests as possible. For example:
Which follows the original minithesis approach:
What do you think if we can implement it the same way? For example with std::panic::catch_unwind by handling the
Result::Err
case. It might be easier for the end-users to write such tests with minithesis-rust.However, it is more an idea and I am not completely sure if it could be implemented this way
The text was updated successfully, but these errors were encountered: