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

Uploaded CPython 3.13Windows x86-64

rustest-0.15.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.15.0-cp313-cp313-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

rustest-0.15.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.15.0-cp312-cp312-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

rustest-0.15.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.15.0-cp311-cp311-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

rustest-0.15.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.15.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.15.0.tar.gz.

File metadata

  • Download URL: rustest-0.15.0.tar.gz
  • Upload date:
  • Size: 383.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0.tar.gz
Algorithm Hash digest
SHA256 8a8820cc130d4acd4a7eb142c57c1c618729ccd0e7137969f57b7181a1fa4043
MD5 5e70855bee07b7973518563b942d52ea
BLAKE2b-256 672370e7befd3da6cf3aa7a1b3027ea10f6ed8586dc15054ee483110be2b6a15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.9.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 11148f84ac3c34e39d3e498d78c665f5363a68d40d59ed6be5d0cf200ff3fd83
MD5 88725b2b40d4b0e8f3b224f9961e35e3
BLAKE2b-256 20777c75d92f40728a509f094655099c96b5adb37098f61ead9a7408afcbd7f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 250d66ce5c12549eac70716927b09ff4bf3df3558d23969712696405697221c8
MD5 c5273f3aab892e749f60ebb4d29379bd
BLAKE2b-256 e37d50ea007014442f55de25c752d428352642daa3a94cddd573ee0d5b644024

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf3221e1a0c82fca2e7dfb7643d3524a5a534e78e9ed55ae5d4bc2ad1e8d1e04
MD5 deea527b23d7114894c870bfeb0d63c6
BLAKE2b-256 29f9956462ec14b5f1ff20569aaf6ca59ba58ff1c165872cdf771dd0363916f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.9.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bca2d2013124247472cbbf4a76d7902f4b31765925826934177a643da74d73c7
MD5 f39e3c0f7769e59e5a4264fb13b8f278
BLAKE2b-256 7e5e3160c8861884d045d598d8252a32d13bbd85ab44468a8c7abf02fbec4dbb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 77df8ac8090701c3b1e9d51f005dd56a00bc3ea0b6668d0e56d51ebea744cfe4
MD5 b9a0bc295aedcae428912a283723669c
BLAKE2b-256 a9392a6de340d6378df87a5d3e2fa396c648300b1dbfb119747b669bbb5c53d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b2dc90db98c0db132474b08f6d203bf5caa4eea9d6e096f8920852bbcf019ec6
MD5 6b5a2765877a11c60459a7ad0153f6a8
BLAKE2b-256 271789c3bf2196b03e5c3edbfd674a64821166626d4d3677d82d97b2b540a116

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.9.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 027a272f4277125c24c874492340d4eef0eaf3d152957e78780384329915559d
MD5 81f2ff46adb8bd3bd620f95a8825b596
BLAKE2b-256 afa3992c031d7e6ad7e7221eb1ebd9ba44805d0f493ee3c14d8200d7641843a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce111af58be17a4fc3d7257fe54f70d27f0b5b1aa472d5cd44f6a35c365550e4
MD5 3ec06072e974035936635e428dde5e0e
BLAKE2b-256 742c83b73a9f15df8785474ab53481c291bcdcfa9c61676361a24cb6a969b6e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e465bdb952eebe85ab7db85b9c2bde4060673431938cd221d2f750695c7da55
MD5 7fcf1497e7ebe0f774ae1544884bee87
BLAKE2b-256 da516101d5f717e32d29ac4388acf356fb758f8f9248b8ee0291eda317b3cf57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.9.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 38b56d3f0074df87ab38135c94a7ee2b7ad9ab2c9ea0785f673baefe9759be38
MD5 4bd9d8ca9ec1609d71cde17468e82b1a
BLAKE2b-256 19bfbf2705bc41715689734308455f113f09cee1df8bc4da64a7f1220fe6e72f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de7c5acd8573d969c73c9e1c2072ca41304b37a07e6c763239b48ddd5b6e61d3
MD5 dac0599ff73a652343c151dbaff24c97
BLAKE2b-256 4446838bc2189c70b9620a6b33e626a69f3c2fef17bca25484e8c6b5ca16dd3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.15.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.14 {"installer":{"name":"uv","version":"0.9.14","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.15.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4cb03d23c4aa62188c3f8e39f991ed8f6a94d4e506325f94ae96adeeb493e31e
MD5 e9846332e24d1f28ba0ddbf190b74e50
BLAKE2b-256 849c098f053b279cf339b72599eef70447299a4b095908961f9df026432d33cd

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