coveragepy icon indicating copy to clipboard operation
coveragepy copied to clipboard

report.omit not working with relative_files

Open gaborbernat opened this issue 2 years ago • 3 comments

When doing https://github.com/pypa/virtualenv/pull/2477 I noticed that with relative_files report.omit seems no longer active. See failing run https://github.com/pypa/virtualenv/actions/runs/3824948711/jobs/6507540653, while before turning relative files on here https://github.com/pypa/virtualenv/actions/runs/3821105582/jobs/6499921063 seems to still work.

The config file is here: https://github.com/gaborbernat/virtualenv/blob/fix/pyproject.toml#L96-L112

gaborbernat avatar Jan 02 '23 21:01 gaborbernat

Hmm, it looks like a relative omit pattern like 'src/whatever/*.py' won't work with relative_files=true. You can make it work for now with a pattern of '*/src/whatever/*.py' while I figure out the implications of a change...

nedbat avatar Jan 03 '23 02:01 nedbat

Your workaround worked perfectly, so I adopted that for now.

gaborbernat avatar Jan 03 '23 05:01 gaborbernat

As a data point, I believe this worked when we were using version 6.5. So it might be a regression between those versions.

thejcannon avatar Jun 15 '23 20:06 thejcannon