Backend Tests

How to run pytest to ensure code quality and functionality Use when this capability is needed.

tomevault-io fce9ceb 2 files · 1.5 KB Updated

File contents

Python Tests

We use Pytest for unit testing. We also use ./backend/pyproject.toml to configure Pytest. There are two ways to run tests check:

  1. Manually:

    docker compose -f ./docker/docker-compose.yaml up -d  # this will start the PostgreSQL Database
    cd ./backend
    uv run pytest -vv
    cd -
    docker compose -f ./docker/docker-compose.yaml down  # this will stop the PostgreSQL Database
    
  2. Via script (run from project root), this will also run formatting, lint and type annotation check:

    ./scripts/linting.bash --backend
    

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/jpmolinamatute--arch-stats--backend-tests commit fce9ceb6fa

Frequently asked questions

npx skillmds@latest add tomevault-io/backend-tests