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 less 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 will 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.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_vimqf-0.8.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e1a8527d2e45298f3a986a83123d9c58f4b18d99cbdcfaeadf0b327bcc7e0dd1
MD5 b0e1c7f6cd51e154a001dc8142a8ebfa
BLAKE2b-256 421184d3aa502eca133104f4e5e513599d219f8736e5a0c5725da6d104f8aab3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_vimqf-0.8.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2768286f7dff19efa8d9fca0a9131077aa19236a87349236798b0a30a12f031
MD5 1344ef649aff4a22a932575c1563de61
BLAKE2b-256 253e8fb1140ab451d9e0b5624a1832a3f54fcb9200ecb2096711b22d5fc0ae7f

See more details on using hashes here.

Supported by

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