modules in cwd can't be --omitted

Issue #33 resolved
Danek Duvall created an issue

I'm having trouble with --omit. The code that we're testing is off in $PROTO, and the test suite itself is in the current directory, in directories "api" and "cli". So I'm running coverage as

{{{ coverage html --omit $PROTO/mod1,$PROTO/mod2,api,cli }}}

but that doesn't actually exclude api and cli from the report. I also tried with $PWD/api,$PWD/cli, but no dice.

In code_unit_factory(), we match against "prefix", but that prefix has been turned into an absolute pathname, so the .startswith() call doesn't return true, and we end up putting them into the final list.

If we check against cu.filename instead of, it appears to work correctly, but I'm not sure if that breaks something else.

Comments (4)

  1. Former user Account Deleted

    I wonder, how --omit was supposed to work in the first place, with that abs_file()...

  2. Log in to comment