Skip to main content

GitHub Workflow Status PyPI PyPI - Python Version Build system: poetry

A simple pytest plugin that will shrink pytest output when specified, to fit the vim quickfix window.

The problem

The vim quickfix window prepends || to commands output lines, to differentiate from its actual fix elements. This behaviour is intended and not configurable.

Pytest default terminal reporter calculates the available terminal width and organize its layout accordingly, often printing characters to the far right of the screen.

When running pytest in vim (for example using pytest-vim-compiler inside vim-dispatch), its output in the quickfix window will show a broken layout (since there actually are fewer columns available than pytest calculated).

This issue is exacerbated if signcolumn is set.

The solution

Pytest-vimqf simply trick pytest's terminal reporter in thinking the terminal is slightly smaller. This allows it to fit nicely in the vim quickfix window.

Installation

Install using pip:

# pip install pytest-vimqf

Usage

The plugin is disabled by default, allowing pytest to use the whole terminal when called normally.

From inside vim, simply add the flag --vim-quickfix to pytest. For example:

:Dispatch pytest --vim-quickfix

Release files for pytest-vimqf 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-vimqf 0.8.1
File Size Uploaded
pytest_vimqf-0.8.1.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-vimqf 0.8.1
File Interpreter ABI Platform
pytest_vimqf-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.4 kB

Release files / pytest_vimqf-0.8.1.tar.gz

Download URL pytest_vimqf-0.8.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
699123339293b939bf04a1785f9fca7b9eca9a34b0a7bc377a4362a021b79470
BLAKE2b-256 checksum
How to use checksums
9661e9c3af9915c493fc4ccd790914d206c9dd0529b2ae3a197f475988a82d6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.10.6-arch1-1-vfio

Release files / pytest_vimqf-0.8.1-py3-none-any.whl

Download URL pytest_vimqf-0.8.1-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
050a79f1d7ea3aa3f0b1517d400c34353c49301af7120b5771f462f284365ad6
BLAKE2b-256 checksum
How to use checksums
211679d10768e768ec7d078e20d1378ae3fcabbc18786034447277c540aea25f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.10.6-arch1-1-vfio

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page