Originally reported byGeoff Bache (Bitbucket: geoffbache, GitHub: Unknown)
In coverage 2.* it always used to work to just write
coverage -o , even though the documentation said "-o" was for absolute path prefixes. I found this ability fairly useful as I have third-party code inside my source tree. Would it be possible to restore this functionality?
(I have a patch for this which I will attach shortly)
Original comment byGeoff Bache (Bitbucket: geoffbache, GitHub: Unknown)
Posted a simple fix (output of "hg bundle", hope this is OK) that essentially removes the code that converts all omit arguments to absolute paths (and adds a unit test for it). After all, source code files are referred by relative path name at this point if possible anyway, so converting to absolute paths only has the affect of making these references not work as far as I can see. If they were absolute to start with it will of course have no effect.
Original comment byrozza (Bitbucket: rozza, GitHub: rozza)
It would be nice if you could override the factory in an easy manner - as I like the regex style omission of files (similar to figleaf) - and in the end I had to overwrote the code_unit_factory:
exclude_patterns = [re.compile(line.strip()) for line in omit_prefixes if line and not line.startswith('#')]
filtered = 
for cu in code_units:
skip = False
for pattern in exclude_patterns:
skip = True
if not skip:
code_units = filtered
It would be nice to have some way of hooking or extending this cleanly.