Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhanced --omit globbing handling #34

Closed
nedbat opened this issue Nov 16, 2009 · 2 comments
Closed

enhanced --omit globbing handling #34

nedbat opened this issue Nov 16, 2009 · 2 comments
Labels
enhancement New feature or request

Comments

@nedbat
Copy link
Owner

nedbat commented Nov 16, 2009

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


@nedbat
Copy link
Owner Author

nedbat commented May 16, 2010

Original comment by Zooko O'Whielacronx (Bitbucket: zooko, GitHub: zooko)


This is a related ticket: http://bitbucket.org/ned/coveragepy/issue/36/provide-regex-style-omit

@nedbat
Copy link
Owner Author

nedbat commented May 23, 2010

This has been added in <<changeset b03faea6d93f (bb)>>: --omit and --include both use fnmatch to match filename patterns.

@nedbat nedbat closed this as completed May 23, 2010
@nedbat nedbat added major enhancement New feature or request labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant