Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Differences between result and expected cluttering the terminal when AssertionError is raised

gabriel.bustamante (2540 points)
3 6 20
in HW8 by (2.5k points)

While testing my program in the early stages I found that the terminal easily filled with the differences between my result and the expected one. These will surely be useful later on, but they can make the tests' outcome more difficult to read; so I googled a way to avoid that and only see what kind of errors the tests raised:

Simply paste this above check_json_file_to_list in testlib.py

longMessage = False
"""
If the list my function returned is wrong:
False means that numbers won't fill the terminal
True will show lots of numbers (very long and annoying!)
"""

longMessage is True by default, setting it to False will show a more concise report of the error(s) with less specific information

179 views

Please log in or register to answer this question.