Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: regexes Clear Filter

Coverage.py Regex Pragmas

Coverage.py uses regexes to define pragma syntax. This is surprisingly powerful. Coverage.py lets you indicate code to exclude from measurement by adding comments to your Python files. But coverage implements them differently than other similar tools. Rather than having fixed syntax for these comments, they are defined using regexes that you can change or add to. This has been surprisingly powerful. The basic behavior: coverage finds lines in your source files that match the regexes. These lin