TestJump (TJ)
A CLI tool that helps you quickly navigate to test functions in pytest files.
When making fundamental changes to a project, multiple test cases often fail. Instead of manually opening files and searching for each failing test, TestJump allows you to jump directly to the test location 🤷.
Installation
Install this tool using pip:
pip install testjump
Or using pipx:
pipx install testjump
Or using uv:
uv tool install testjump
Usage
- Jump to a test function:
tj tests/test_calculator.py::test_addition
- Jump to a test class method:
tj tests/test_user.py::TestUser::test_user_creation
- Jump using pytest output (supports FAILED prefix):
tj "FAILED tests/test_user.py::TestUser::test_user_creation - Failed: assertion error"
Interactive Usage with Multiple Files
You can use it interactively with a file containing multiple jump points:
for line in $(cat jumppoints.txt); do tj $line; echo "Press any key to continue..."; read; done
Output Options
TestJump supports different output formats:
- Print location only (useful for scripting):
tj tests/test_calculator.py::test_addition -print
# Output: tests/test_calculator.py:42
- JSON output with detailed information:
tj tests/test_calculator.py::test_addition -json
# Output:
# {
# "status": "ok",
# "path": "tests/test_calculator.py",
# "class_name": null,
# "function_name": "test_addition",
# "lineno": 11
# }
Configuring Your Editor
TestJump uses VS Code by default, but you can configure your preferred editor by setting the TJ_EDITOR environment variable:
# For VS Code (default)
export TJ_EDITOR=vscode
# For Vim
export TJ_EDITOR=vim
# For IntelliJ IDEA
export TJ_EDITOR=idea
# For PyCharm
export TJ_EDITOR=pycharm
# For Neovim
export TJ_EDITOR=nvim
Add this to your .bashrc or .zshrc to make it permanent.
Contributing
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd testjump
python -m venv .venv
source .venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[dev]'
Or if you are using uv:
uv sync --extra dev
To run the tests:
uv run pytest .
To help ensure consistent code quality that follows our guidelines, pre-commit may be used. We have git hooks defined which will execute before commit. To install the hooks:
pre-commit install
Metadata
Release files for testjump 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| testjump-0.1.6.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| testjump-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / testjump-0.1.6.tar.gz
| Download URL | testjump-0.1.6.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8708efa47de5cbaf5a5ca51d4560620d3845f5dd338cbfe998ff298e451c629
|
|
BLAKE2b-256 checksum How to use checksums |
545964c6a4debb4e8f7628aadd0451275c76a006a5f8a740abd33e2539753b17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.8
|
Release files / testjump-0.1.6-py3-none-any.whl
| Download URL | testjump-0.1.6-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
525c8d0522e48cb6e4035bb774d2e233bc15147b06b7a0fb94ea250efa5d349d
|
|
BLAKE2b-256 checksum How to use checksums |
ce66855608ade7fa0d2943fcb4819bd91c75dd286b6e5d3e91f2c9b9f120e70b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.8
|
Security for testjump 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.