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. You can write multiple symbols comma separated.

There is also a special simplified mode for users of git:

pytest –test-this-git

this will try to automatically guess the symbols to run againsts based on a git diff and run pytest-test-this againsts those symbols

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

Uploaded Source

Built Distribution

pytest_test_this-0.3.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-test-this-0.3.0.tar.gz
  • Upload date:
  • Size: 4.4 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.3.0.tar.gz
Algorithm Hash digest
SHA256 ae5ec35b302966818d6e640e9a9f6ef3d2f36091dde378897597c8d440464754
MD5 c47536dd46de6b6021c2f9cf323356a7
BLAKE2b-256 85fc15d8462f6707c787234f67d19daeb6f00c4a3e93c038e386edb019d9a4b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_test_this-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 983b175bc570fca09006e362b2996c790109eaceef795d1ab9fe94684ce2e8da
MD5 076889edd0e1e5b1c2adba5a1f23c545
BLAKE2b-256 0f065ed8db3e0b0ee7e0f1dbf733090e3284666814d8cced254d2e2d714999de

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