Metadata-Version: 2.4
Name: fireemu-testing
Version: 0.2.0
Summary: Lightweight Python & pytest Test World wrapper for Fireemu
Author: Fireemu contributors
License: Apache-2.0
Project-URL: Homepage, https://fireemu.github.io/fireemu/
Project-URL: Documentation, https://fireemu.github.io/fireemu/guides/test-worlds/
Project-URL: Repository, https://github.com/fireemu/fireemu
Project-URL: Issues, https://github.com/fireemu/fireemu/issues
Keywords: firebase,emulator,testing,firestore,pytest,fireemu
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: pytest
Requires-Dist: pytest>=7; extra == "pytest"

# fireemu-testing

Lightweight, zero-dependency Python & `pytest` Test World wrapper for [Fireemu](https://fireemu.github.io/fireemu/).

## Prerequisites

Install the standalone `fireemu` binary (via Homebrew, Shell installer, Nix, or npm) and ensure `fireemu` is on `PATH` (or set `FIREEMU_BINARY_PATH`).

## Install

```sh
pip install fireemu-testing
# With pytest fixtures
pip install "fireemu-testing[pytest]"
```

## Usage

```python
from fireemu_testing import create_test_world

with create_test_world(
    project_id="demo-app",
    services=("auth", "firestore"),
    clock_start="2026-01-31T23:59:00Z",
) as world:
    with world.apply_env():
        # Connect Firebase Admin SDK or Google Cloud Firestore client here.
        world.clock.advance(60_000)
        world.reset_state()
```

With `rebaseline()`, checkpoints, and `pytest`:

```python
from fireemu_testing.pytest_plugin import make_pytest_fixtures

fireemu_world, fireemu = make_pytest_fixtures(
    services=("auth", "firestore"),
    clock_start="2026-06-01T00:00:00Z",
)
```
