Skip to main content

Rust powered pytest-compatible runner

Project description

rustest logo

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

📚 Full Documentation | Getting Started | Migration Guide

🚀 Try It Now

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

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 fixturestmp_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 →

Installation

pip install rustest
# or
uv add rustest

Python 3.10-3.14 supported. 📖 Installation Guide →

Quick Start

Write a test in test_example.py:

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:

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 →

Learn More

Contributing

Contributions welcome! See the Development Guide for setup instructions.

License

MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rustest-0.13.0.tar.gz (330.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rustest-0.13.0-cp313-cp313-win_amd64.whl (996.2 kB view details)

Uploaded CPython 3.13Windows x86-64

rustest-0.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

rustest-0.13.0-cp313-cp313-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rustest-0.13.0-cp312-cp312-win_amd64.whl (996.2 kB view details)

Uploaded CPython 3.12Windows x86-64

rustest-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rustest-0.13.0-cp312-cp312-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rustest-0.13.0-cp311-cp311-win_amd64.whl (997.7 kB view details)

Uploaded CPython 3.11Windows x86-64

rustest-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rustest-0.13.0-cp311-cp311-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rustest-0.13.0-cp310-cp310-win_amd64.whl (998.1 kB view details)

Uploaded CPython 3.10Windows x86-64

rustest-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rustest-0.13.0-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file rustest-0.13.0.tar.gz.

File metadata

  • Download URL: rustest-0.13.0.tar.gz
  • Upload date:
  • Size: 330.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0.tar.gz
Algorithm Hash digest
SHA256 c20c00ef41dbc5bb235efb9808e0664be5f73cc07dd0893ab9a7f4d5aa6ff6ac
MD5 e7217f2acb4d4b3207eb3fb5fbdd37f4
BLAKE2b-256 54dfeb7f34ad17dc6ec03c844429a32d456596c39b7d68a609fa494db6dd6907

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 996.2 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8387bfcd57a13af8c8fd5673bb016d90c019d1ae449efb0dc711346d43525ab1
MD5 487193b35700c9751e3b939e8f6d7ddd
BLAKE2b-256 6e3138a9f13351d5af2fc124c5f6b3d63f17e04be655926690c441757d7f3126

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f365ab0f47da5cc2a32c06372da595d7cb03a9871b2aec6f3b18dc4d7e042cd2
MD5 a2f150e0d3268e812c0ee14766103759
BLAKE2b-256 9d5a2860eabdaa862528536eb8123566e40cdbc342292aff2745f31ee266267c

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a758558c3a3960fbd6e7c8ce335f7d4116342264a2332ed6ee55265b8bc9b98d
MD5 aa714f0f07eba91b6a7beacc9888de85
BLAKE2b-256 5dd4ecd31c6b9920c2fa5e41f978bf5639f2a215608f35cde81ebf84a6631213

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 996.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f62582a2f1d7d1e3ba575ee4b87ea02a100c93ea2ef2ffda6b3e2501ad9001e7
MD5 f1884f8ad801b17774b56bbab1e1be4d
BLAKE2b-256 35f18e2d325378906865990156149dd281e8083456bcc883cb627b1c9f7a207d

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcba1625e0a5d276149eab8e94ae7f6d5d6a762cfccb547106b702c389842e0e
MD5 f64626bb52e24be65d9bd105169ee06d
BLAKE2b-256 17ae6430825dc02a2a2ccf5555ca94eaaa47266f8b4b71b828d068fa18faa016

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 83e39711ef07f273840faef733956d4af8bbe4a934533efd0d9abeddc541937f
MD5 1fcd9e8d4a56248e59d46fa4a56e61e7
BLAKE2b-256 7c5031a86e1e3c1cb9283a0e7e9a12fc77e463e0c10f3d009ac7408f8453c4fb

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 997.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1557310f6f1299b94e4b2aa9d0a076c1760a6e2f10a7cc8ae9017c0b37820775
MD5 b716d23c0b5cf565c63f8bb1512a2e63
BLAKE2b-256 64753b103b728acf9ed12dba3a1bb246068b9eb7fa0ee99ca8904a318bee041e

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9fb460ac5e7c193c0ebe905185356300a42ce7d8b9cf57b3863e1f5e930e1029
MD5 5e4216e9e0c8e502f7192c645376b062
BLAKE2b-256 8681848787296ff940e9f719a4d0e86603647cce6c597a72cca8672722fe0ae1

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d389cd3f67f9346af5c89463fc9b0b02787569fc26f928e28351be3a0ae19ad
MD5 e2ed52337be997e6529342900be81f5f
BLAKE2b-256 a1a278f11ee07dae72ddd6f51e0f9e5aec9b2440177df0beaff4b1f080f487e3

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 998.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 33821d5daef6ecbb4ef3554d365ecfccf7eae85b43a5f15e3aea4d4b8b783459
MD5 224a367c893c41ff133434a63d95d213
BLAKE2b-256 aafb2f758f00e26ac0277a465fa902222a17a2f9adc96f450a2d1be8ab9f275c

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc393a5f26f68c1deb6c6cb60411437262ab59ef1f3a5ccbcf0a96380f55b52f
MD5 e0461b4d0c5a6db228f6856ff38a7b1f
BLAKE2b-256 dfaa5d0ef146e3531e42a9278e743efb3f549629c5daf288f40b3cd5deae38cb

See more details on using hashes here.

File details

Details for the file rustest-0.13.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rustest-0.13.0-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rustest-0.13.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ac7c9856692ca6911454fdd589fda75db49dc894217a4c66a3fa0f8d7dbe867
MD5 677befb628dafe44ac3d7135bdfdd082
BLAKE2b-256 87a554c0a4f18ae62cfbd4d967c0a0a736ea3d77dd024f62d99e63ef853114b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page