# Test Compressor Fixtures

> This skill covers patterns for creating fixtures to test compression passes. Trigger: Load this skill when working with test_compressor.

- Skill: `jnzader/test-compressor-fixtures` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jnzader/test-compressor-fixtures`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jnzader/test-compressor-fixtures/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: JNZader (https://skillmd.com/u/jnzader)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jnzader/test-compressor-fixtures

---


<!-- L1:START -->
# test-compressor-fixtures

This skill covers patterns for creating fixtures to test compression passes.

**Trigger**: Load this skill when working with test_compressor.
<!-- L1:END -->

<!-- L2:START -->
## Quick Reference

| Task | Pattern |
|------|---------|
| Create user fixture | `create_user` |
| Get user fixture | `get_user` |

## Critical Patterns (Summary)
- **Create User Fixture**: Use `create_user` to set up a user for testing.
- **Get User Fixture**: Utilize `get_user` to retrieve user data for tests.
<!-- L2:END -->

<!-- L3:START -->
## Critical Patterns (Detailed)

### Create User Fixture

Use `create_user` to set up a user for testing compression passes in your tests.

```python
from tests.test_compressor import create_user

user = create_user(name="Test User", email="test@example.com")
```

### Get User Fixture

Utilize `get_user` to retrieve user data for tests, ensuring the user exists before running tests.

```python
from tests.test_compressor import get_user

user = get_user(user_id=1)
```

## When to Use

- When you need to create a user for testing compression functionality.
- When you need to retrieve user data to validate compression results.

## Commands

```bash
pytest tests/test_compressor.py
```

## Anti-Patterns

### Don't: Hardcode User Data

Hardcoding user data can lead to brittle tests that fail when data changes.

```python
# BAD
user = create_user(name="Hardcoded User", email="hardcoded@example.com")
```
<!-- L3:END -->
