How to disable console print statement while running in Python Unittest framework.
I have a python function and filename is firstfile.py
def testfn():
a = 5, b=5
c = a + b
print 'Addition result:', c
return c
I am calling this function in my unittest python script that,
from firstfile import testfn
....
....
def func1():
# calling this testfn() here in my unit test
res = testfn()
self.assertEqual(res, '10')
In console, I do not want to print this "print 'Addition result:', c" while running unittest. How to achieve this. Please help it. Thanks in advance