Skip to main content

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

Project description

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

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

pytest_vimqf-0.8.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

pytest_vimqf-0.8.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest_vimqf-0.8.1.tar.gz.

File metadata

  • Download URL: pytest_vimqf-0.8.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.6-arch1-1-vfio

File hashes

Hashes for pytest_vimqf-0.8.1.tar.gz
Algorithm Hash digest
SHA256 699123339293b939bf04a1785f9fca7b9eca9a34b0a7bc377a4362a021b79470
MD5 cd4f2cc6785f109b185c5c8cb061c2e5
BLAKE2b-256 9661e9c3af9915c493fc4ccd790914d206c9dd0529b2ae3a197f475988a82d6b

See more details on using hashes here.

File details

Details for the file pytest_vimqf-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: pytest_vimqf-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.10.6-arch1-1-vfio

File hashes

Hashes for pytest_vimqf-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 050a79f1d7ea3aa3f0b1517d400c34353c49301af7120b5771f462f284365ad6
MD5 afd557123bfd93355c87bb8212499699
BLAKE2b-256 211679d10768e768ec7d078e20d1378ae3fcabbc18786034447277c540aea25f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page