Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Other Sciences
Programming and Computer Science
How to Catch and Print Assertion Errors in Python
Reply to thread
Message
[QUOTE="pbuk, post: 6299451, member: 385977"] Hmmm, looking again I am not sure you are using a unit test framework. Is this an online tutorial? If so, stick with my first answer: catch the assertion and print its message. You can look up how to catch the failing assertion with [icode]try...except[/icode] and how to get the message string from an [icode]AssertionError[/icode] in a Python reference if you haven't covered them already (have you skipped some of the tutorial?). [/QUOTE]
Insert quotes…
Post reply
Forums
Other Sciences
Programming and Computer Science
How to Catch and Print Assertion Errors in Python
Back
Top