Skip to content

Quick Start: Running Tests

TL;DR

pytest tests/

That's it! Redis and PostgreSQL will start automatically in Docker containers.

What You'll See

๐Ÿณ Starting test containers (Redis & PostgreSQL)...
โณ Waiting for Redis to be ready...
โœ… Redis is ready
โณ Waiting for PostgreSQL to be ready...
โœ… PostgreSQL is ready
โœ… All test services are ready

tests/test_cache.py ...................... [ 10%]
tests/test_integration.py ................ [ 20%]
...
260 passed, 5 skipped in 75.76s

๐Ÿงน Cleaning up test containers...
โœ… Test containers cleaned up

Requirements

  • Docker (must be running)
  • Python 3.11+
  • Dependencies: pip install -e ".[dev]"

Common Commands

Run all tests

pytest tests/

Run specific test file

pytest tests/test_cache.py -v

Run with coverage

pytest tests/ --cov=fiml

Skip Docker (use existing services)

pytest tests/ --no-docker

What Changed?

Before: 24 tests skipped (Redis/PostgreSQL not available)
After: 0 tests skipped for Redis/PostgreSQL - containers auto-start!

Need Help?

See docs/TESTING.md for full documentation.