ayu is a TUI and pytest-plugin, which allows you to run your pytest tests in a more interactive fashion in your terminal.
- 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
- View your code coverage (first view is just based on a
--collect-only
)
Currently just exploratory, changes made here are not persisted to your pytest config
- View your plugin options and discover new plugins
- Shows the console output, that would normally be written into the terminal
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.
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
ayu needs your project to be uv-managed and you need your tests be discoverable by pytest.
To discover all your tests under tests
uvx ayu
To discover all your tests under a specific directory
uvx ayu <PATH/TO/DIR>
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.