How to I get the code below to print all AssertionErrors within a given test? To be clear I'm not looking to create additional tests. Thank you!
import unittest
def lbs_to_stones(lbs):
return lbs/14
class Tests(unittest.TestCase):
def test_lbs_to_stones(self):
self.assertEqual(lbs_to_stones(140),10)
self.assertEqual(lbs_to_stones(150),11)
self.assertEqual(lbs_to_stones(14),61)
if __name__ == '__main__':
unittest.main()
Output:
AssertionError: 10.714285714285714 != 11
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (failures=1)