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.17.0.tar.gz (447.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.17.0-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

rustest-0.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

rustest-0.17.0-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rustest-0.17.0-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86-64

rustest-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rustest-0.17.0-cp312-cp312-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rustest-0.17.0-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

rustest-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rustest-0.17.0-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rustest-0.17.0-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

rustest-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rustest-0.17.0-cp310-cp310-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: rustest-0.17.0.tar.gz
  • Upload date:
  • Size: 447.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0.tar.gz
Algorithm Hash digest
SHA256 606c132322b50ab3fd967d87b2bc8480fb27a7d024b074e897b1c5c1663486d2
MD5 58d44d12514e4bffd3d4df8255efc832
BLAKE2b-256 71093e20bd9c85824e4e575944feaee2391f66ee917df916280e5ea31a760546

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0252fa8d89a486a723416d9ab8709691ac4263a5f42921a25996635e615b9270
MD5 3a6dcca0b6d444c5a573aacb948d0f5b
BLAKE2b-256 e165bd1ac69a045412ee311776bf4b5b67cf8cc2229505b464863c2e6008d7b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37a26aafb6088e1ab9d0c1a8cb1db27e69db31810f478c5fb5664cc9eeb2cff5
MD5 207b605e65d63d010e5b7941b6d542cc
BLAKE2b-256 7f0b7012ecf8ddc0dab63baf6098d3bc5f644fcbceb1d3e003e7d3b5e7df3fe8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 339313c591f7050523e5543b32cdd1f10db8900ff3cc179662c44de370bd21f2
MD5 2d0731767cd86f446a87c3bc7bc86e52
BLAKE2b-256 0144918d56526a40839647a3964df5032b755a81665360911fb59696ccc72409

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ced03f73ea0a5d6bf39ecef4ee77539b7346476405a190c48c707cac0adca01e
MD5 30fc8523ed851ce3312c27c91ebddf8a
BLAKE2b-256 391369e59f7d53d02276ac9f9900a39ae7d4e41cc97aa2b611f5fb22581cf344

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 475a6fd614f71844a3a8afa9aef1e43e92c8fecb501bce60681cbd101705bb0d
MD5 bff2bfab2386d4053267c3c01e3df123
BLAKE2b-256 35e7cf5898e4be98622c8644807d7547e0b5c2b37fe6643743efdc49b7d727e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b20817ea1ed04ffb14a9d0b9bdaa7740d0176bd89f86502f8c1e274e7fb06388
MD5 297d19f2d99d3f112652bbead4f1be7a
BLAKE2b-256 bb9645ec02a2aecc28ee4c9706ec5d44a50283c614677877dfce5d870604a6e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ac78ac2d425094b155bfbe6bc9a331575967a22bdc3a396708c69a6721925723
MD5 a428aa124944efec35418b15db328bc6
BLAKE2b-256 128036507a3dd7b830a3ed5fb667f9a7b81dd68f58e27ea9baf81bf0d5fd3206

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 69db2dd0702aafee82c61ecfa4e509b0b3d25b41859ca151f240b3012b571d04
MD5 d0981678f4e93c589d01147f76c45b3d
BLAKE2b-256 74193f6ef1814c72c96844a136ab2e4096afa345409626db4ec62b18ba80d3c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22279a167329439cbe0b458de1ab101b7b3a58f83eef737f950cca034e2301c8
MD5 10d74b428eb455bdb19c20c25cedb55d
BLAKE2b-256 828d003e7d8175312484acb2ada2c9d2effcc42b7e1814fde5320cd0455c8e32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 97076f3eae2028749e576001197abb05bd7b49751e996a6c9bd8e512c9fe09f0
MD5 f5d1058f7442ee250a14c46f7d4c61ed
BLAKE2b-256 e4fd89cd919d1687be50a973abe70cfe2f964afb9f502592ec60d8a10666dc39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07e842ef38006991ee1bb76b844583fd8ce7aa28d4ac6ecdb5b42c63806dcffa
MD5 b807b2171b64c19f13d6f8ee42ad5345
BLAKE2b-256 9703dd27358c15b8051e9c7666b8dd495f958ec47fa4ff67e1927e7985501f91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.17.0-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"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.17.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da96603dfdba72414fc234b980ebdf56c21e8c146737232c1dd05832a2da286d
MD5 ccb9bd69eb76c8ce5346c506b31b044e
BLAKE2b-256 f46e03ce065b1cd57ec7ef74c87572ed6154248a628e487748679b3841dab6e6

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