# Testing & Development

## Install dev dependencies

```bash
pip install -e ".[dev]"
```

## Run tests

```bash
pytest
```

## Run integration tests

```bash
pytest -m integration
```

## COM integration tests (opt-in)

Excel COM automation is intentionally opt-in.

PowerShell:

```powershell
$env:EXCELMINER_RUN_COM_TESTS='1'
pytest -m integration
```

## Coverage

Default coverage uses `.coveragerc` and omits COM-only code.

Include COM backend in coverage:

```bash
pytest --cov-config=.coveragerc.com
```

## Formatting

This repository includes configuration for:

- `black`
- `isort`
- `flake8`
- `mypy`

You can run these manually:

```bash
black src/excelminer tests
isort --profile black src/excelminer tests
```

### Pre-commit (recommended)

Install the git hooks (one-time):

```bash
pip install -e ".[dev]"
pre-commit install
```

Run on demand:

```bash
pre-commit run --all-files
```
