Metadata-Version: 2.4
Name: rustest
Version: 0.16.2
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT 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: Programming Language :: Rust
Classifier: Topic :: Software Development :: Testing
Requires-Dist: typing-extensions>=4.15
Requires-Dist: rich>=13.0.0
Requires-Dist: basedpyright>=1.19 ; extra == 'dev'
Requires-Dist: maturin>=1.4,<2 ; extra == 'dev'
Requires-Dist: packaging>=20.0 ; extra == 'dev'
Requires-Dist: poethepoet>=0.22 ; extra == 'dev'
Requires-Dist: pre-commit>=3.5 ; extra == 'dev'
Requires-Dist: py>=1.11 ; extra == 'dev'
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.2.0 ; extra == 'dev'
Requires-Dist: pytest-codeblocks>=0.17.0 ; extra == 'dev'
Requires-Dist: ruff>=0.1.9 ; extra == 'dev'
Requires-Dist: zensical ; extra == 'docs'
Provides-Extra: dev
Provides-Extra: docs
License-File: LICENSE
Summary: Rust powered pytest-compatible runner
Author: rustest contributors
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://apex-engineers-inc.github.io/rustest
Project-URL: Homepage, https://github.com/Apex-Engineers-Inc/rustest
Project-URL: Repository, https://github.com/Apex-Engineers-Inc/rustest

<div align="center">

![rustest logo](assets/logo.svg)

</div>

Rustest is a Rust-powered pytest-compatible test runner delivering **8.5× average speedup** with familiar pytest syntax and zero setup.

📚 **[Full Documentation](https://apex-engineers-inc.github.io/rustest)** | [Getting Started](https://apex-engineers-inc.github.io/rustest/getting-started/quickstart/) | [Migration Guide](https://apex-engineers-inc.github.io/rustest/from-pytest/migration/)

## 🚀 Try It Now

Run your existing pytest tests with rustest — no code changes required:

<!--pytest.mark.skip-->
```bash
pip install rustest
rustest --pytest-compat tests/
```

See the speedup immediately, then migrate to native rustest for full features.

## Why Rustest?

- 🚀 **8.5× average speedup** over pytest (up to 19× on large suites)
- 🧪 **pytest-compatible** — Run existing tests with `--pytest-compat`
- ✅ **Familiar API** — Same `@fixture`, `@parametrize`, `@mark` decorators
- 🔄 **Built-in async & mocking** — No pytest-asyncio or pytest-mock plugins needed
- 🐛 **Clear error messages** — Vitest-style output with Expected/Received diffs
- 📝 **Markdown testing** — Test code blocks in documentation
- 🛠️ **Rich fixtures** — `tmp_path`, `monkeypatch`, `mocker`, `capsys`, `caplog`, `cache`, and more

## Performance

Rustest delivers consistent speedups across test suites of all sizes:

| Test Count | pytest | rustest | Speedup |
|-----------:|-------:|--------:|--------:|
|         20 | 0.45s  |  0.12s  |  3.8×   |
|        500 | 1.21s  |  0.15s  |  8.3×   |
|      5,000 | 7.81s  |  0.40s  | 19.4×   |

**Expected speedups:** 3-4× for small suites, 5-8× for medium suites, 11-19× for large suites.

**[📊 Full Performance Analysis →](https://apex-engineers-inc.github.io/rustest/advanced/performance/)**

## Installation

<!--pytest.mark.skip-->
```bash
pip install rustest
# or
uv add rustest
```

**Python 3.10-3.14 supported.** [📖 Installation Guide →](https://apex-engineers-inc.github.io/rustest/getting-started/installation/)

## Quick Start

Write a test in `test_example.py`:

```python
from rustest import fixture, parametrize, mark, raises

@fixture
def numbers():
    return [1, 2, 3, 4, 5]

def test_sum(numbers):
    assert sum(numbers) == 15

@parametrize("value,expected", [(2, 4), (3, 9)])
def test_square(value, expected):
    assert value ** 2 == expected

@mark.asyncio
async def test_async():
    result = 42
    assert result == 42

def test_exception():
    with raises(ZeroDivisionError):
        1 / 0
```

Run your tests:

<!--pytest.mark.skip-->
```bash
rustest                      # Run all tests
rustest tests/               # Run specific directory
rustest -k "test_sum"        # Filter by name
rustest -m "slow"            # Filter by mark
rustest --lf                 # Rerun last failed
rustest -x                   # Exit on first failure
```

**[📖 Full Documentation →](https://apex-engineers-inc.github.io/rustest)**

## Learn More

- **[Getting Started](https://apex-engineers-inc.github.io/rustest/getting-started/quickstart/)** — Complete quickstart guide
- **[Migration from pytest](https://apex-engineers-inc.github.io/rustest/from-pytest/migration/)** — 5-minute migration guide
- **[User Guide](https://apex-engineers-inc.github.io/rustest/guide/writing-tests/)** — Fixtures, parametrization, marks, assertions
- **[API Reference](https://apex-engineers-inc.github.io/rustest/api/overview/)** — Complete API documentation

## Contributing

Contributions welcome! See the [Development Guide](https://apex-engineers-inc.github.io/rustest/advanced/development/) for setup instructions.

## License

MIT License. See [LICENSE](LICENSE) for details.

