Logo

dev-resources.site

for different kinds of informations.

Pytest Fish shell autocompletion

Published at
12/29/2024
Categories
python
pytest
shell
fish
Author
pomidoroshev
Categories
4 categories in total
python
open
pytest
open
shell
open
fish
open
Author
12 person written this
pomidoroshev
open
Pytest Fish shell autocompletion

TL;DR https://github.com/ddoroshev/pytest.fish

Typing repetitive commands or copying and pasting test names can eat up valuable time. To help, I've created pytest.fish - a Fish shell plugin that simplifies your pytest workflow. It's lightweight, simple to set up, and makes testing more efficient.

How to Use

Autocomplete test paths

Type pytest and hit TAB to get suggestions for test paths and functions:

Support for -k filter

Narrow down tests with -k and get name suggestions:

The plugin dynamically scans your project, so suggestions stay up-to-date.

Installation

Install with Fisher:

fisher install ddoroshev/pytest.fish
Enter fullscreen mode Exit fullscreen mode

Or manually copy the files from the repository into your Fish configuration.

How It Works

The plugin doesn't rely on pytest directly (yet). Instead, it scans the current directory for test files and searches for test functions inside them, making the process relatively fast and efficient.

Other shells?

Since I primarily use Fish in my local development environment, I created a plugin specifically for this shell. However, if you use Bash or Zsh, feel free to create your own - or switch to Fish already. ๐Ÿ˜‰

pytest Article's
30 articles in total
Favicon
Handling Unmanaged Models in Pytest-Django
Favicon
Mastering Pytest Monkeypatch: Simplify Your Testing
Favicon
Pytest Fish shell autocompletion
Favicon
Creating a To-Do app with HTMX and Django - Part 2: Adding the Todo model with tests
Favicon
How to encourage developers to fix Python warnings for deprecated features
Favicon
No Country For \0 (Escaping Characters Issues in ReportPortal)
Favicon
Overcoming LLM Testing Challenges with Pytest and Trulens: Ensuring Reliable Responses
Favicon
How ReportPortal "Made" Pytest Run Twice
Favicon
Writing Integration And Unit Tests for a Simple Fast API application using Pytest
Favicon
Pytest exited with code 1 issue
Favicon
Pytest Mocks, o que sรฃo?
Favicon
Automate your tasks Using Pytest: A practical guide with examples
Favicon
Pytest and PostgreSQL: Fresh database for every test (part II)
Favicon
Setting Up a Comprehensive Python Build Validation Pipeline in Azure DevOps
Favicon
Unit testing in Python with sheepy
Favicon
Review of Kumar Sโ€™s โ€œPython Automation Testing With Pytestโ€ Udemy Course
Favicon
Mocking Python Classes
Favicon
Pytest and PostgreSQL: Fresh database for every test (part I)
Favicon
Securing Testing Secrets with pytest-mask-secrets
Favicon
CS50P Problem Set 5 - Back to the Bank
Favicon
Simplifying Test Execution with pytest.main()
Favicon
Injecting Fun into Python Testing
Favicon
How to run python based AWS lambda tests using pytest and localstack
Favicon
What I learned in the Real Python testing courses
Favicon
Pytest How to pass .yaml file as argument in pytest command line
Favicon
The project that will make you enjoy writing tests for your Django app
Favicon
CI using GitHub Actions
Favicon
How to Handle pytest Timeouts
Favicon
PyTest unit testing now underway
Favicon
Testing using Pytest!

Featured ones: