Giter Club home page Giter Club logo

pytuist's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.