F
Frank Zheng
Hi, all:
I have a GUI program , And i add log in my program to know what happened
at run time.
for example:
def fun(log):
....#do some sth
log.write('do some sth')
at run time:
fun(open('mylogfile.log','w'))
Now, I want do some unit test first, my question is what param to be passed
to 'fun' can make 'log.write(...)' work as 'print'?
Thanks in advance!
Frank
I have a GUI program , And i add log in my program to know what happened
at run time.
for example:
def fun(log):
....#do some sth
log.write('do some sth')
at run time:
fun(open('mylogfile.log','w'))
Now, I want do some unit test first, my question is what param to be passed
to 'fun' can make 'log.write(...)' work as 'print'?
Thanks in advance!
Frank