virtualEnvironment/lib/python2.7/site-packages/coverage/codeunit.py
def source_file(self):
        """Return an open file for reading the source of the code unit."""
        if os.path.exists(self.filename):
            # A regular text file: open it.
            return open_source(self.filename)

        # Maybe it's in a zip file?
        source = self.file_locator.get_zip_data(self.filename)
        if source is not None:
            return StringIO(source)

        # Couldn't find source.
        raise CoverageException(
            "No source for code '%s'." % self.filename
            )
def source_file(self):
        if os.path.exists(self.filename):
            # A regular text file: open it.
            return open_source(self.filename)

        # Maybe it's in a zip file?
        source = self.file_locator.get_zip_data(self.filename)
        if source is not None:
            return StringIO(source)

        # Couldn't find source.
        raise CoverageException(
            "No source for code '%s'." % self.filename
            )
def source_file ( self ) : if os . path . exists ( self . filename ) : # A regular text file: open it. return open_source ( self . filename ) # Maybe it's in a zip file? source = self . file_locator . get_zip_data ( self . filename ) if source is not None : return StringIO ( source ) # Couldn't find source. raise CoverageException ( "No source for code '%s'." % self . filename )
Return an open file for reading the source of the code unit.
Return an open file for reading the source of the code unit .