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!
pip install testfinder
cd <project-root>
testfinder
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)
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.