Commits

Ned Batchelder committed cad5665

Finish the paperwork on Julian's patch.

  • Participants
  • Parent commits 8fac8d3

Comments (0)

Files changed (4)

 Marc Abramowitz
 Chris Adams
 Geoff Bache
+Julian Berman
 Titus Brown
 Brett Cannon
 Pablo Carballo
 - Files encoded as UTF-8 with a BOM are now properly handled, fixing
   `issue 179`_.  Thanks, Pablo Carballo.
 
+- Fixed more cases of non-Python files being reported as Python source, and
+  then not being able to parse them as Python.  Closes `issue 82` (again).
+  Thanks, Julian Berman.
+
 - Try to do a better job of the impossible task of detecting when we can't
   build the C extension, fixing `issue 183`_.
 
 - Testing is now done with `tox`_.
 
+.. _issue 82: https://bitbucket.org/ned/coveragepy/issue/82/tokenerror-when-generating-html-report
 .. _issue 179: https://bitbucket.org/ned/coveragepy/issue/179/htmlreporter-fails-when-source-file-is
 .. _issue 183: https://bitbucket.org/ned/coveragepy/issue/183/install-fails-for-python-23
 .. _tox: http://tox.readthedocs.org/

File coverage/parser.py

         statements.
 
         """
-
         try:
             self._raw_parse()
         except tokenize.TokenError:

File test/test_html.py

         have been raised when writing the HTML report.
 
         """
-
         source = "exec compile('', '', 'exec') in {'__file__' : 'liar.html'}"
         self.make_file("liar.py", source)
         self.make_file("liar.html", "{# Whoops, not python code #}")