Skip missing files during coverage report
vmalloc opened this issue · 5 comments
Often times coverage reports contain missing files. This happens when tests create temporary files and import them (and then delete them), but also when using virtualenv (in which cases modules have fake or tampered file names).
Currently coveralls
fails for such cases:
Traceback (most recent call last):
File "/usr/local/bin/coveralls", line 9, in <module>
load_entry_point('python-coveralls==2.2.0', 'console_scripts', 'coveralls')()
File "/usr/local/lib/python2.7/dist-packages/coveralls/__init__.py", line 84, in wear
source_files=coverage.coveralls(args.base_dir),
File "/usr/local/lib/python2.7/dist-packages/coveralls/control.py", line 7, in coveralls
return CoverallsReporter(self, self.config).report(base_dir)
File "/usr/local/lib/python2.7/dist-packages/coveralls/report.py", line 9, in report
with open(cu.filename) as fp:
IOError: [Errno 2] No such file or directory: '/tmp/tmp2sSAzd/dir_1/dir_2/test_2.py'
Will it still report whatever it can or just stop on first error?
On Wed, Jul 3, 2013 at 10:54 AM, Andrea de Marco notifications@github.com
wrote:
Hi @vmalloc,
in issue #6 we discussed the possibility to add the-i
(--ignore-error
) option likecoverage
command.Do you think this could be a solution that solve this issue too?
Reply to this email directly or view it on GitHub:
#7 (comment)
I simply think a missing file should not be considered an error since it happens in a very trivial scenario (virtualenv)
On Wed, Jul 3, 2013 at 10:54 AM, Andrea de Marco notifications@github.com
wrote:
Hi @vmalloc,
in issue #6 we discussed the possibility to add the-i
(--ignore-error
) option likecoverage
command.Do you think this could be a solution that solve this issue too?
Reply to this email directly or view it on GitHub:
#7 (comment)
Because i would give to coveralls
command the same behaviour of coverage xml
.
However I use the venv to and you could exclude it from coverage in the .coveragerc
.
Ok, I guess it would work.
On Wed, Jul 3, 2013 at 11:10 AM, Andrea de Marco notifications@github.com
wrote:
Because i would give to
coveralls
command the same behaviour ofcoverage xml
.However I use the venv to and you could exclude it from coverage in the
.coveragerc
.Reply to this email directly or view it on GitHub:
#7 (comment)