python-test-framework icon indicating copy to clipboard operation
python-test-framework copied to clipboard

Supply custom error message on timeout tests

Open Voileexperiments opened this issue 7 years ago • 1 comments

Currently both JS and Python versions have test constructs to test if some pieces of code runs under a certain time limit, but they do not allow the use of custom error message like every other test constructs do.

So, like @timeout(sec) should become @timeout(sec, msg) with a default value?

Voileexperiments avatar Apr 22 '18 23:04 Voileexperiments

Is this really required? The only error message which makes sense for the timeout decorator is "Exceeded time limit of N seconds", and that's exactly what it says right now.

Moreover, the default error message must always be prepended in case somebody decides to pass something useless as the msg argument (e.g. like it's done with assert_equals); so the purpose of this custom messages is... to add a comment?

FArekkusu avatar Mar 27 '20 21:03 FArekkusu