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)
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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for testfinder-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea441a55a9dfa1545b9b9bd288831cd523eaa5a3972b9123c7a335b10f28466a |
|
MD5 | 870a0a84330cc75c6be85fcf1e1f0f2b |
|
BLAKE2b-256 | 7e489d9c946441a6dcf5a103ae4bc2a8d08f84eb756f284fad114d3a764106b4 |