• Segev Finer's avatar
    Make coverage.py handle "stringsource" better by making it clear that it is... · b96ae4d9
    Segev Finer authored
    Make coverage.py handle "stringsource" better by making it clear that it is not a file name (GH-4440)
    
    Having a code object with `co_filename` set to just "stringsource" (e.g. when using memory views or auto-pickling), causes coverage.py to think that "stringsource" is a relative path to an actual file. The convention is to wrap such fake paths with angle brackets, which coverage.py correctly recognizes.
    
    You will recognize this as the following error, e.g. when running "coverage html":
        No source for code: '.../stringsource'.
        Aborting report output, consider using -i.
    b96ae4d9
Scanning.py 17.7 KB