Skip to content

[BUG]: Test Database Isolation #124

@Acuspeedster

Description

@Acuspeedster

name: 🐛 Bug Report
about: Create a report to help us improve FireForm.
title: "[BUG]: Test database is not isolated between tests"
labels: bug
assignees: ''

⚡️ Describe the Bug

In conftest.py, the database fixture uses scope="session".

The database is created once and reused across tests.

Data written by one test persists into others, causing:

  • Order-dependent failures
  • Flaky test behavior

👣 Steps to Reproduce

  1. Run test suite multiple times.
  2. Change test order.
  3. Observe inconsistent failures.

📉 Expected Behavior

Each test should start with a clean database.


🕵️ Possible Fix

  • Change fixture to function scope.
  • Drop and recreate tables before each test.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Week X Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions