Replies: 1 comment
-
I wouldn't want to throw the actual assertion error, as the main cause is actually the timeout error. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think
until_asserted
is super cool and useful, we use it a lot in one of my projects. But I think it will be better to raise the underlyingAssertionError
instead ofConditionTimeoutError
when the timeout is reached. My reasoning is that we use busypie in our testing framework and It's much better to see the Assertion error and its message instead ofConditionalTimeoutError
. Example:this will produce
busypie.awaiter.ConditionTimeoutError: Failed to meet condition of [assertion_function] within 2 seconds
But for me, it's better and more readable to see the assertion error
My naive solution is to check if the last error produced by the function passed to
unitl_asserted
is instance of anAssertionError
and to raise the error instead of raisingConditionalTimeoutError
I see that you add the last error as the cause of the
ConditionTimeoutError
, but I have to scroll through the stack trace to find the actual cause, which is not ideal if I have to examine multiple failed tests in a test report.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions