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

Uploaded Python 3

File details

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

File metadata

  • Download URL: testjump-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1712eb08422f2352fe35dcc2a5fb9db023af0c1ca92d71aaac0d3c1e73535661
MD5 cadc7c7c2f584f6abbc59e531f1c6de7
BLAKE2b-256 4451de0f090a26438ea1521eb2ffe035dfdf72cfee97c7fe3045ec2226fd7b09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: testjump-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b50914f1d97ea3cddb703e604b80e91b0c3e9dcbcad8ac4361a302a5a840a94f
MD5 56fd80864094f074e728eabde3217d51
BLAKE2b-256 2e3d5f2db4b2c7c5f398d39e78b5cc6578f0ec3f8a2a94658c1d8c1a830a2b4c

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