Edit the source code of a failed test with `pytest --edit`.
Project description
pytest-edit
A simple Pytest plugin for opening editor on the failed tests.
Installation & usage
Install with:
pip install pytest-edit
Usage:
pytest --edit
Setting the right editor & editor support
Use $EDITOR
environment variable to set the editor that should be opened.
E.g. you can add export EDITOR=vim
line to your .bashrc
or .zshrc
to set
the editor to vim
.
If no editor is set, the defaults are vi
for POSIX platforms and notepad
for Windows.
The plugin tries to be cleaver about the options given to the detected editor. If something is not working properly for you, don't hesitate to open an issue.
I have not tested 90% of the editor support - there are at least 3 platforms with tens of different editors. I use Linux and NeoVim. If you use anything else, your results may vary. Issues & PRs welcome.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_edit-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33fdd05a7b7f5f01a6a014f8049793a50955cd9d990b5ae71f4735c5fe561819 |
|
MD5 | 137cc70de307431918df1d72eae4b4b5 |
|
BLAKE2b-256 | 2732e530829fa85d40c64defe3631aa9eb220ebba36eea39332cf211ccb757b9 |