Skip to main content

A TUI (terminal user interface) for pytest, because testing should be fun.

Project description

pytuist

A TUI (terminal user interface) for pytest

I personally love TUI tools - so why not learn how to make my own and create something that would be valuable for my day-to-day work?

Installation

pip install pytuist

Note this package is only available for Windows at the moment. I will look to add support for Linux and MacOS in the future.

If someone could show me how on earth I specify that with Poetry, that would be great.

Usage

Within a project with tests conforming to pytest requirements, run pytuist to start the UI within the active terminal:

╭─────────────────────────────────────────────────────────────────────────────────────────── pytuist ───────────────────────────────────────────────────────────────────────────────────────────╮
│ arrows: navigate | enter: expand/collapse | space: run | q: quit                                                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────── Tests ────────────────────╮ ╭────────────────────────────────────────────────────────────────── Output ───────────────────────────────────────────────────────────────────╮
│ test                                      [-] │ │ Run a test to see the output here                                                                                                           │
│ ├── test_root                             [-] │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
│ │   └── test_in_root                      [-] │
│ ├── test_root_again                       [-] │
│ │   └── test_another_in_root              [-] │
│ ├── child                                 [-] │
│ │   ├── test_child                        [-] │
│ │   │   ├── test_child                    [-] │
│ │   │   └── test_another_in_child         [-] │
│ │   └── grandchild                        [-] │
│ │       ├── test_another_grandchild       [-] │
│ │       │   ├── test_another_grandchild   [-] │
│ │       │   └── test_that_fails           [-] │
│ │       └── test_grandchild               [-] │
│ │           └── test_grandchild           [-] │
│ └── unit                                  [-] │
│     └── actual_test                       [-] │
│         ├── test_construct_test_hierarchy [-] │
│         └── test_render                   [-] │
╰───────────────────────────────────────────────╯

Navigate using arrow keys, press enter to expand/collapse folders, and space to run a test. Output generated by pytest will be shown in the output panel.

Future Work

Current functionality is known to be minimal (and Windows-only), and I hope to continue expanding upon it and making the user experience as easy as possible.

I'm sure there are plenty of configurations where the intended highlighting and functionality doesn't work, so feel free to let me know what horrible bugs you encounter if you'd like to.

This was largely a project to help me become familiar with rich and create TUI apps, so we'll see where it goes from here.

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

pytuist-0.0.1.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

pytuist-0.0.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file pytuist-0.0.1.tar.gz.

File metadata

  • Download URL: pytuist-0.0.1.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Windows/10

File hashes

Hashes for pytuist-0.0.1.tar.gz
Algorithm Hash digest
SHA256 74c9db7d19e83e789e736660b91286bd0c847d7254bf6a3fea87a2b76d44b9b3
MD5 5d206313987805b6b857724eab60d1d9
BLAKE2b-256 d09e02b4f9cd75a7e339f3f1653b34f9ba25b16688fe4b014e301831d4f933a3

See more details on using hashes here.

File details

Details for the file pytuist-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytuist-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Windows/10

File hashes

Hashes for pytuist-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ebde2771da4c2c01d83863cf7827b19327750217bf5546558ef0616f012eec6
MD5 1f1f6ceb4fa857492575bfaf10f4a607
BLAKE2b-256 f62017db902b94cd4c5cf68582747f79ba0109e27fb218fe0f1f202e55d7dfb8

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