F
Felix Wiemann
$ cat test.py
print "Hello World!"
if 0:
print "Never executed."
if 1:
print "Hi."
$ python test.py
Hello World!
Hi.
$ python /usr/lib/python2.3/trace.py --count test.py
Hello World!
Hi.
trace: Could not open '/usr/lib/python2.3/threading.cover' for writing: [Errno 13] Permission denied: '/usr/lib/python2.3/threading.cover'- skipping
Traceback (most recent call last):
File "/usr/lib/python2.3/trace.py", line 690, in ?
main()
File "/usr/lib/python2.3/trace.py", line 687, in main
results.write_results(missing, summary=summary, coverdir=coverdir)
File "/usr/lib/python2.3/trace.py", line 271, in write_results
lnotab, count)
TypeError: unpack non-sequence
Why doesn't it work?
By the way, after running trace.py, there is a file test.cover in the
directory:
$ cat test.cover
1: print "Hello World!"
if 0:
print "Never executed."
1: if 1:
1: print "Hi."
print "Hello World!"
if 0:
print "Never executed."
if 1:
print "Hi."
$ python test.py
Hello World!
Hi.
$ python /usr/lib/python2.3/trace.py --count test.py
Hello World!
Hi.
trace: Could not open '/usr/lib/python2.3/threading.cover' for writing: [Errno 13] Permission denied: '/usr/lib/python2.3/threading.cover'- skipping
Traceback (most recent call last):
File "/usr/lib/python2.3/trace.py", line 690, in ?
main()
File "/usr/lib/python2.3/trace.py", line 687, in main
results.write_results(missing, summary=summary, coverdir=coverdir)
File "/usr/lib/python2.3/trace.py", line 271, in write_results
lnotab, count)
TypeError: unpack non-sequence
Why doesn't it work?
By the way, after running trace.py, there is a file test.cover in the
directory:
$ cat test.cover
1: print "Hello World!"
if 0:
print "Never executed."
1: if 1:
1: print "Hi."