Git Product home page Git Product logo

Comments (4)

joeyespo avatar joeyespo commented on August 11, 2024 1

Honestly for a while I was a little skeptical of officially adding support for this, since doing so turns the the current non-interactive tool (meaning no dependency on stdin or the terminal that hosts the app) into an interactive one.

Seems there's some interest though, so perhaps it'd be worth the extra complexity. We could add stdin or keyboard event monitoring to the main watch loop.

In theory this should be easy, like how adding a keyboard handler in the main loop of a game is easy. From working on py-getch, I can say, there's a chance keyboard monitoring (e.g. tty / stdin in "raw mode" / etc) won't be so straightforward unfortunately. Pytest-watch is cross platform, so this feature should be too.

Curious, can anyone point to other test runners that do this so we can draw inspiration about how to design the UI and keyboard-monitoring technique?

from pytest-watch.

blueyed avatar blueyed commented on August 11, 2024

Makes total sense to me - thought so myself already.

from pytest-watch.

apast avatar apast commented on August 11, 2024

Excellent!

I miss some Re-Run tests shortcut. By example, pressing R, tests re-run the same way when a file change event happens.

from pytest-watch.

joeyespo avatar joeyespo commented on August 11, 2024

Just came across pynput. That could help with cross-platform keyboard monitoring.

Looks like setting up a monitor will run a callback, which is similar to how we handle file events today.

from pytest-watch.

Related Issues (20)

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.