Skip to main content

Find test cases on a Python project.

Project description

testfinder - Find tests easier

Command-line tool to find, print all the test cases in a project.

  • Find your test methods, class names faster.
  • Integrate with other search/filtering/autocomplete tools like bash, grep, fzf.
  • Defaults to pytest test invocation syntax. -- Other invocation syntax like Django coming soon!

Install

pip install testfinder

Usage

cd <project-root>
testfinder

with fzf

fzf is an interactive Unix filter for command-line that can be used with any list and supports fuzzy searches.

  • Install fzf

  • Run pytest and find your test

pytest $(testfinder | fzf)

asciicast

How does it work?

In Python the files containing tests usually have the following naming conventions:

  • tests.py
  • test_*.py
  • *_test.py
  • tests/__init__.py

It enumerates all the files above, and discovers all the test cases in those files with a few simple regexes.

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

testfinder-0.0.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

testfinder-0.0.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file testfinder-0.0.2.tar.gz.

File metadata

  • Download URL: testfinder-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Darwin/20.3.0

File hashes

Hashes for testfinder-0.0.2.tar.gz
Algorithm Hash digest
SHA256 662256a9fb2dbe2fd4050d742c95f343558d306e5149dd3dcd9e404e203f620c
MD5 ee490fe3caef022853435bca5dfb22f5
BLAKE2b-256 0442761f43563c693a7de24aba7bfe6332db60e46648f11b09da0b20cbddfaea

See more details on using hashes here.

File details

Details for the file testfinder-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: testfinder-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Darwin/20.3.0

File hashes

Hashes for testfinder-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea441a55a9dfa1545b9b9bd288831cd523eaa5a3972b9123c7a335b10f28466a
MD5 870a0a84330cc75c6be85fcf1e1f0f2b
BLAKE2b-256 7e489d9c946441a6dcf5a103ae4bc2a8d08f84eb756f284fad114d3a764106b4

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