enhanced --omit globbing handling

Issue #34 resolved
Danek Duvall created an issue

Currently, the --omit processing code specifically looks for glob characters because of limitations of the Windows shell. That said, if you want to omit a module by its name alone, rather than its full path, then you can't do something like {{{ coverage html --omit */cherrypy }}} If you let the (unix) shell expand that, the expansion may very well fail, preventing the command from running at all. If you escape the glob character from the shell so that it gets passed into coverage raw, then it will attempt to expand that the way the shell does, and will fail the same way.

It would be useful to use fnmatch to filter out patterns, instead of (or in addition to, depending on the argument) startswith().

Comments (2)

  1. Log in to comment