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 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.

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.2.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.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: testjump-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 6101a44958d7a2d85987988d814a1a6dbb0c7fb11eca0a756e4890c920fd2798
MD5 45b4fe52106972707e3acc0753f8d0f4
BLAKE2b-256 6a8f56dcb8fda90abcd95cfbf4d3b87c462fb468f9df534130bcc07b13d0483e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: testjump-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd3ce35d6b94a03c7f328aac512c8c3dbc1f5372ca0f3905cd60fa424e283a2a
MD5 d362accd25d8845cf0b3f759cfe763e9
BLAKE2b-256 61fddf33d02dfedbc6368c118556468847ea2b6ec7bd03b04c54a1f74afc8246

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