Skip to main content

An interactive TUI for pytest

Project description

Ruff PyPI-Server Pyversions License: MIT Downloads Coverage Status

ayu

ayu is a TUI and pytest-plugin, which allows you to run your pytest tests in a more interactive fashion in your terminal.

Features

Main Screen

preview

  • Explore your Test tree
  • Mark tests to run, via the test-tree, markers or the search function
  • View and filter test results and debug errors

Coverage Viewer

coverage

  • View your code coverage (first view is just based on a --collect-only)

Plugin Explorer

Currently just exploratory, changes made here are not persisted to your pytest config

plugin

  • View your plugin options and discover new plugins

Log

log

  • Shows the console output, that would normally be written into the terminal

File Watcher

If toggled, ayu utilizes watchfiles, to detect changes in the directory you declared when executing ayu (default: tests). After a change is detected, a notification is shown and all tests under the specific file will be run automatically.

How does it work

The application starts a local websocket server at localhost:1337 and the plugin sends data about collected tests/plugins/results to the app. The host and port can be customized with the following environment variables

It utilizes uv in the background to run pytest commands. Concrete it runs uv run --with ayu pytest [PYTEST-OPTION] to utilize your python environment and installs the plugin temporary on the fly to send the data to the TUI, without changing your local environment or adding dependencies to your project.

AYU_HOST=localhost
AYU_PORT=1337

Requirements & Usage

Requirements

ayu needs your tests be discoverable by pytest. It works best when your project is managed by uv. Using it without uv may work, but is not supported.

Usage

To discover all your tests under tests

uvx ayu

To discover all your tests under a specific directory

uvx ayu <PATH/TO/DIR>

Feedback and Issues

Feel free to reach out and share your feedback, or open an Issue, if something doesnt work as expected. Also check the Changelog for new updates.

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

ayu-0.5.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ayu-0.5.1-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file ayu-0.5.1.tar.gz.

File metadata

  • Download URL: ayu-0.5.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ayu-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a155216bafa0e3ecf97f30d4e6aa76efaa6bd0cf2ef8b800011f661f1f5da2b0
MD5 4c1366bcb20431c0af62682fc8c4a82d
BLAKE2b-256 be79d31c96a63fc8f6defa1b54dc936962561256dd92b8dc17c5a72e67e397d1

See more details on using hashes here.

File details

Details for the file ayu-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: ayu-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ayu-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa9d25ba50586214120fcc1d75a0c8b10b467f32f1d29f9c915ae00586525ae4
MD5 b207ed2643c318bdbf737ae85c934fcd
BLAKE2b-256 836c6f2e38d1bff9975c27b95f7636f5235dd800495644d7afe2767dbd040dd4

See more details on using hashes here.

Supported by

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