Skip to main content

A CLI tool that opens VS Code at the line where a function/method is defined

Project description

TestJump (TJ)

A CLI tool that helps you quickly navigate to test functions in pytest files.

Installation

Install this tool using pip:

pip install testjump

Or using pipx:

pipx install testjump

Or using uv:

uv tool install testjump

Usage

  1. Jump to a test function:
tj tests/test_calculator.py::test_addition
  1. Jump to a test class method:
tj tests/test_user.py::TestUser::test_user_creation

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

Configuring Your Editor

TestJump uses VS Code by default, but you can configure your preferred editor by setting the TESTJUMP_EDITOR environment variable:

# For VS Code (default)
export TESTJUMP_EDITOR=vscode

# For Vim
export TESTJUMP_EDITOR=vim

# For IntelliJ IDEA
export TESTJUMP_EDITOR=idea

# For PyCharm
export TESTJUMP_EDITOR=pycharm

# For Neovim
export TESTJUMP_EDITOR=nvim

Add this to your .bashrc or .zshrc to make it permanent.

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

testjump-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

testjump-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file testjump-0.1.0.tar.gz.

File metadata

  • Download URL: testjump-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for testjump-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91ceb80fa308d518b45f20df379e51acfe21abc7fae9f39153d08991712d56df
MD5 51f79d972a4880d67c57d76250628fce
BLAKE2b-256 1f7fbdb21fc06d544fcee4fa4a3806200c2554021d3bb62f909efc04382abb03

See more details on using hashes here.

File details

Details for the file testjump-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: testjump-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for testjump-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85a0b031143f47995e40d5970e91e08e5243ca07ba8f909a5b81d8d920005743
MD5 3d7dfb4a83f6ea0203eb0e06062e53f3
BLAKE2b-256 ed6f3cd74577a281a8b7d9d005ed41abae4c58fca10b1ab4d89ab7fc7ea2a206

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page