Commits

Ned Batchelder  committed 803b614

pyratemp somehow claims code came from ''. Fixes #221.

  • Participants
  • Parent commits 4d04e22

Comments (0)

Files changed (2)

 
 - ``debug sys`` now shows the configuration file path that was read.
 
+- If an oddly-behaved package claims that code came from an empty-string
+  filename, coverage.py no longer associates it with the directory name,
+  fixing `issue 221`_.
+
+.. _issue 221: https://bitbucket.org/ned/coveragepy/issue/221/coveragepy-incompatible-with-pyratemp
+
 
 Version 3.6b1 -- 28 November 2012
 ---------------------------------

File coverage/control.py

         should not.
 
         """
+        if not filename:
+            # Empty string is pretty useless
+            return False
+
         if filename.startswith('<'):
             # Lots of non-file execution is represented with artificial
             # filenames like "<string>", "<doctest readme.txt[0]>", or