Is there a way to run unittests in pycharm in verbose mode. I am looking for a way to see the docstring in the test functions so that i can see some info of the ran test.
class KnownValues(unittest.TestCase):
known_values = (
([1, 2],[[1, 2]]),
([1, 2, 3], [[1, 2], [1, 2, 3]]),
([1, 2, 3, 4],[[1, 2], [1, 2, 3, 4]]),
([1, 2, 3, 4, 5],[[1, 2], [1, 2, 3], [1, 2, 3, 4, 5]]),
([1, 2, 3, 4, 5, 6],[[1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5, 6]]),
)
def test_check(self):
'''This should check is the function returning right'''
for arg, result in self.known_values:
print("Testing arg:{}".format(arg))
assert program.lister(arg) == result
if __name__ == '__main__':
unittest.main()
It returns:
Testing started at 19:38 ч. ...
Testing arg:[1, 2]
Process finished with exit code 0
I want to get:
test_check (__main__.KnownValues)
This should check is the function returning right ... Testing arg:[1, 2]
ok
----------------------------------------------------------------------
Ran 1 test in 0.001s
OK