You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
kazk
transferred this issue from codewars/codewars-runner-cli
Mar 27, 2020
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?
* removed the use of `test.expect_no_error` inside the timeout utility:
- done "manually", allowing to handle data passed to the thread
- consequence: DOCS need an update because there isn't any extra assertion anymore, now.
* tested on cw with 3.6, 3.8 wihtout imports, 3.8 with imports: work as expected.
* removed a comment in the framework about the timeout (deprecated info)
* added the default message for timeout ssertion (codewars#4)
Still need to upddate the tests output (and maybe the tests files)
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?The text was updated successfully, but these errors were encountered: