-
Notifications
You must be signed in to change notification settings - Fork 24
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
Tests silently consume AssertionError in Python #13
Comments
The first one works because it doesn't involve this test framework at all. This test framework wasn't made to work with https://github.com/codewars/python-test-framework/blob/v0.1.0/codewars_test/test_framework.py is the deployed version. |
Looks to me like it's supposed to catch from https://docs.codewars.com/languages/python/authoring/#calling-assertions :
python-test-framework/codewars_test/test_framework.py Lines 112 to 113 in 072ae38
should likely be: except AssertionException:
pass and python-test-framework/codewars_test/test_framework.py Lines 23 to 24 in 072ae38
(if it says ALLOW raise, then it should not be raising itself, it should ... ALLOW someone else to do it, except, that's probably not the intention of the flag, rather that seems to be aborting early -- that's the only reason why |
AssertionError doesn't show up in the output when it's raised inside a function decorated by
test.describe
,test.it
, or inside any function called by those. It correctly stops the execution, emits a non-zero exit code, and results in a test failure, but there's no error message. The issue is present both in Python 3.6 and Python 3.8.This works:
While any of these doesn't:
The text was updated successfully, but these errors were encountered: