Skip to content

PyTracer: RecursionError triggers "Trace function changed" warning #787

@blueyed

Description

@blueyed

Given t_coverage_recursion.py:

def f():
    f()


try:
    f()
except Exception as exc:
    print(exc)

print(1)

coverage run -m t_coverage_recursion.py:

maximum recursion depth exceeded in comparison
1
Coverage.py warning: Trace function changed, measurement is likely wrong: None (trace-changed)
__path__ attribute not found on 't_coverage_recursion' while trying to find 't_coverage_recursion.py'

This only happens when using "timid = 1" (PyTracer):

[run]
timid = 1

coverage report then shows "t_coverage_recursion.py 7 3 57%".

Coverage.py, version 4.5.3 with C extension, Python 3.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions