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.1.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for testfinder-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 040f57e6747693beff776b3f67bbb78b8ccd711fa374028dfa2b36475f36d04f |
|
MD5 | 8fb5977f7e8ee8d9cde9a80bf3e3c2e1 |
|
BLAKE2b-256 | fbc3a01c51e60e69a04970c9fe23ea054cebf92ca9527822eac2a0d2ed69e4ac |