This repository was archived by the owner on Oct 14, 2020. It is now read-only.
This repository was archived by the owner on Oct 14, 2020. It is now read-only.
@Test.timeout decorator in python doesn't behave correctly anymore #698
Closed
Description
Describe the bug
Known fact: the decorator was tricky to use, but I had found a way and documented it in the wiki about the test framework.
- known problem: if the call to the function of the user was done inside the decorator, he could raise an issue to stop the tests, then the decorator was swallowing the exception (thrown in another thread than the one of the test suite, so didn't trigger the failure of the test suite itself, iirc).
- previous solution: like I documented it, using an intermediate function so that the call to the function of the user is in the current thread all the same.
- current problem: that doesn't work anymore...:
To Reproduce
See this fork of anter69's solution to my "Ulam sequence" kata. I tried different things but only get the printing of the stack trace, the test suite is never crashing.
(edit: btw, there is something weird about the performances: I couldn't make my own solution to pass unless I lowered by 25% the load of the perf tests... x/. Tho that was valide before... That's unrelated to the current problem, tho. Just a note...)
Expected Behavior
Any exception thrown by the user or his code should interrupt the test with an actual failure.