New submission from Alexander Belopolsky <[email protected]>:
Please run attached zip archive as a python script. Note that the problem is
not specific for using __main__.py - any module that comes from a zip archive
or loaded by a custom loader would show the same bug.
$ unzip -l test.zip
Archive: test.zip
Length Date Time Name
-------- ---- ---- ----
79 10-24-08 18:26 __main__.py
-------- -------
79 1 file
$ $ cat __main__.py
from trace import Trace
def traced(flag):
if flag:
return 1
else:
return 2
tracer = Trace()
tracer.runfunc(traced, False)
results = tracer.results()
results.write_results(coverdir='.')
$ python testtrace.zip
--- modulename: __main__, funcname: traced
Not printing coverage data for 'testtrace.zip/__main__.py': [Errno 20] Not a
directory: 'testtrace.zip/__main__.py'
__main__.py(4): __main__.py(7): $
----------
assignee: belopolsky
components: Library (Lib)
files: testtrace.zip
messages: 120626
nosy: belopolsky, haypo
priority: normal
severity: normal
stage: unit test needed
status: open
title: trace module cannot produce coverage reports for zipped modules
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file19522/testtrace.zip
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10342>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com