How to: 6.1 · Running Tests 🧪
Unit tests can be executed with the bundled helper script:

```bash
python -m alpha_factory_v1.scripts.run_tests
```

Always run `python check_env.py --auto-install` beforehand so optional
dependencies like `openai_agents` and `gymnasium` are present. Use
`ALPHA_FACTORY_FULL=1` to install heavy extras.

The helper validates the target directory, prefers `pytest` when
available and otherwise falls back to `unittest`. Ensure all tests pass
before deploying changes.

Install the optional test dependencies with:

```bash
pip install -r requirements-dev.txt
pip install -r requirements.lock  # pinned versions for deterministic setup
pip install -r alpha_factory_v1/backend/requirements-lock.txt  # includes RDKit
```

Install the project in editable mode so tests resolve imports:
```bash
pip install -e .
python check_env.py --auto-install  # times out after 10 minutes