datacamp / pythonwhat

Verify Python code submissions and auto-generate meaningful feedback messages.
http://pythonwhat.readthedocs.io/
GNU Affero General Public License v3.0
69 stars 31 forks source link

The easy way to extract the message associated with "TestFail" #371

Closed sayakpaul closed 5 years ago

sayakpaul commented 5 years ago

Hi.

When a test fails (i.e. the submission code does not conform to the solution code) I get a long error stack. So, instead of that if I directly want to navigate to the message associated with TestFail what would be the easy way to do that? image

hermansje commented 5 years ago

You would wrap your code in a try-catch to handle the TestFail exception and extract the information you want from the exception.

sayakpaul commented 5 years ago

Sure. That sounds good.