Skip to content

enhanced --omit globbing handling #34

@nedbat

Description

@nedbat

Originally reported by Danek Duvall (Bitbucket: dhduvall, GitHub: dhduvall)


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().


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions