I know that I can add the "-v"
to the command line when running a unit test in Python, but how can I modify the following code so that the output is automatically verbose? I tried several variations of adding -v
to the unittest.main()
call, with no success.
Python documentation was also unhelpful.
import unittest
from TestCalculator import sub
class TestStringMethods(unittest.TestCase):
def test_Sub1(self):
self.assertEqual(sub(2,4), 2, 'Subtraction test one broke')
if __name__ == '__main__':
unittest.main()
Thanks.