test-basic.py test case 1 // 0 #4493
Answered
by
davidism
cohogainLYIT
asked this question in
Q&A
-
Can I ask what the purpose of the division of 1 and 0 is for below and can be found in other test cases in test_basic.py? Is it just a condition you never hope to encounter? Is this the appropriate syntax for such a case? def test_exception_propagation(app, client): |
Beta Was this translation helpful? Give feedback.
Answered by
davidism
Mar 24, 2022
Replies: 1 comment 1 reply
-
Look at what the test is testing: it expects that a view that raises an unhandled exception will produce a specific result. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cohogainLYIT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Look at what the test is testing: it expects that a view that raises an unhandled exception will produce a specific result.
1/0
is one easy way to cause an exception.