Skip to main content

Coverage filter

Project description

Coverage filter

Allows developers to indicate which code they are trying to test when using coverage tools.

Warning This is just a proof of concept. The API will likely change as I receive feedback. There are also no unit tests, or other code quality control methods in place. If you wish to use this code, please make a copy for yourself, so my changes won’t break your build.

Example

Example code to be tested: (in target.py)

def target(self):
    return target_inner()

def target_inner(self):
    return 42

Example unit test: (in test_target.py)

from coverage_filter import CoverageFilter
from target import target

@CoverageFilter('target.py:target')
def test_target(self):
    assert target() == 42

For more information, check out my blog on the topic.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coverage_filter-0.0.0.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file coverage_filter-0.0.0.tar.gz.

File metadata

File hashes

Hashes for coverage_filter-0.0.0.tar.gz
Algorithm Hash digest
SHA256 b2740df3908a11471b86adcd652e3f0a164c20dda84d0d7ad4cb0853ed99aebc
MD5 7a3801e5942fbd7ccbc9ade7db8e4002
BLAKE2b-256 7c7aca44f76768a2c039dfca1c33b534be7572e3aa7e542c275e672869b16c5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page