1. Ned Batchelder
  2. coverage.py
  3. Issues
Issue #68 invalid

HTML generation fails on Windows in directories that contain upper-case letters

Aviv Ben-Yosef
created an issue

Using coverage 3.3.1 and nose 0.11.1 on the following: c:\build\proj_ init .py (all dirs empty, _ _init _.py empty)

With nosetests --with-coverage --cover-html (in "build" dir) works, but renaming "build" to "bUild" fails:



Name Stmts Exec Cover Missing

proj 1 1 100%
Traceback (most recent call last):
File "C:\xpyv\Scripts\nosetests-script.py", line 8, in <module> load_entry_point('nose==0.11.1', 'console_scripts', 'nosetests')() File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\core.py", line 113, in init argv=argv, testRunner=testRunner, testLoader=testLoader) File "C:\xpyv\python26.zip\unittest.py", line 817, in init File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\core.py", line 192, in runTests result = self.testRunner.run(self.test) File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\core.py", line 63, in run result.printErrors() File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\result.py", line 88, in printErrors self.config.plugins.report(self.stream) File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\plugins\manager.py", line 82, in call return self.call(*arg, kw) File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\plugins\manager.py", line 150, in simple result = meth(*arg, kw) File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\plugins\cover.py", line 176, in report self.coverHtmlDir) File "C:\xpyv\lib\site-packages\nose-0.11.1-py2.6.egg\nose\plugins\cover.py", line 202, in htmlAnnotate data = open(coverfile, 'r').read().split('\n') IOError: [Errno 2] No such file or directory: 'c:\bUild\proj\init.py,cover'


I've found out that removing the "if not cu.relative: pass" in annotate.py:annotate_files fixes this, but could not understand the root cause.

Comments (4)

  1. Log in to comment