Metadata-Version: 2.4
Name: testjump
Version: 0.1.2
Summary: A CLI tool that opens VS Code at the line where a function/method is defined
Project-URL: Homepage, https://github.com/greatbahram/testjump
Project-URL: Changelog, https://github.com/greatbahram/testjump/releases
Project-URL: Issues, https://github.com/greatbahram/testjump/issues
Project-URL: CI, https://github.com/greatbahram/testjump/actions
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pre-commit>=4.2.0; extra == "dev"
Requires-Dist: pytest>=8.3.5; extra == "dev"
Requires-Dist: ruff>=0.11.2; extra == "dev"
Dynamic: license-file

# TestJump (TJ)

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

## Installation

Install this tool using pip:

```bash
pip install testjump
```

Or using [pipx](https://pipx.pypa.io/stable/):

```bash
pipx install testjump
```

Or using [uv](https://docs.astral.sh/uv/guides/tools/):

```bash
uv tool install testjump
```

## Usage

1. Jump to a test function:

```bash
tj tests/test_calculator.py::test_addition
```

2. Jump to a test class method:

```bash
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:

```bash
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:

```bash
# 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.
