# Testing

Run:

```powershell
pytest
```

## Parser Tests

- `TTV_BlazeKing thanked the bus driver` -> `TTV_BlazeKing`
- `xGhost777 eliminated Player123` -> `xGhost777`, `Player123`
- `[ABC]SweatyMike killed You` -> `[ABC]SweatyMike`
- `FaZe_TestUser joined the lobby` -> `FaZe_TestUser`
- `PlayerOne knocked PlayerTwo with Striker AR` -> `PlayerOne`, `PlayerTwo`

## OCR Cleanup Tests

- `O/0` normalization.
- `I/l/1` normalization.
- Edge symbol trimming.
- Duplicate line removal.

## Scoring Tests

- Exact tracker match.
- Exact Twitch match with gaming evidence.
- Similar username with gaming evidence.
- No match.

## Database Tests

- Save player.
- Update last seen and detection count.
- Merge duplicate players.
- Save lookup result.
- Export CSV.
- Export/import JSON backup.

## Lookup Tests

- Mocked Twitch API lookup.
- No configured source behavior.
- Manual profile result.

## Safety Tests

- No forbidden modules.
- No process memory access primitives.
- No packet capture imports.
- No input automation imports.
- No game hook primitives.
- Visible-pixel capture boundary is documented in source.

