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.

Limitations:
  • 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.

Installation

pip install pytest-test-this

Usage

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.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

pytest_test_this-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pytest-test-this-0.1.0.tar.gz.

File metadata

  • Download URL: pytest-test-this-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for pytest-test-this-0.1.0.tar.gz
Algorithm Hash digest
SHA256 940421fb3b0ccbe5e0ac64eea548e74d4d659b4869e9aa4291163e72a23a1cf2
MD5 1dbcb3950ef66227b545a0e21f87c507
BLAKE2b-256 0cd9134bb83f03082e00fb162010174cd081b68e7462fbb5d2b5d1626e46a1b0

See more details on using hashes here.

File details

Details for the file pytest_test_this-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_test_this-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for pytest_test_this-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98783920683acf168e5c6d0196aae01d837f97ef988e96163064b1b057c5f797
MD5 bf7598ebd6de0895c6bf820d5bccf9a3
BLAKE2b-256 3856e7ccb68cf33268ece9d04e812d1543067bfee4a00595ba75df37539f815e

See more details on using hashes here.

Supported by

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