Skip to main content

Plugin for py.test to run relevant tests, based on naively checking if a test contains a reference to the symbol you supply

Project description

Plugin for pytest to run relevant tests by naively check if test functions contain a reference to the symbol supplied.

  • it only looks for top level test functions, so test classes won’t be discovered

  • very naive check, so indirect usages of a symbol won’t be found

This trade off has been made for speed. This method is extremely fast compared to the other common method which tries to be correct by running the full test suite under coverage and checking if the function was called directly or indirectly.


pip install pytest-test-this


pytest –test-this=foo

…where foo is the name of your function, class or variable.

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

pytest-test-this-0.2.0.tar.gz (3.9 kB view hashes)

Uploaded source

Built Distribution

pytest_test_this-0.2.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page