relative_files & include broken since 7.0 · Issue #1604 · nedbat/coveragepy (original) (raw)
Describe the bug
- Create simple test case with
relative_files = true
mkdir foo
echo 'print()" > foo/bar.py
echo "[run]\nrelative_files = true" > .coveragerc coverage run foo/bar.py
coverage report --include=foo/bar.py
Expected (as behavior was before 7.0):
Name Stmts Miss Cover
--------------------------------
foo/bar.py 1 0 100%
--------------------------------
TOTAL 1 0 100%
Actual:
Additional analysis:
It appears that the regex created from the foo/bar.py
glob pattern includes the current working directory, which might explain why it wouldn't match against relative paths anymore.