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

Uploaded CPython 3.13Windows x86-64

rustest-0.16.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.16.0-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

rustest-0.16.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.16.0-cp312-cp312-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

rustest-0.16.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.16.0-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

rustest-0.16.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.16.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.16.0.tar.gz.

File metadata

  • Download URL: rustest-0.16.0.tar.gz
  • Upload date:
  • Size: 411.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0.tar.gz
Algorithm Hash digest
SHA256 24c57409bd4531061c6b8fd968591c6fc3e03e08b8d27d9af9f17e0231a0ccb0
MD5 15f5c94954f42cac4e0a251a856d6883
BLAKE2b-256 767629894cd59200b1ebadc5baefa3c941dbb412cf1e1f6fb615ecdd4fbb16e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bfdb70e817c3bc8d0c7041708e8c26bde2e0ec16a0d63f298e2f29d46e490095
MD5 d4d0c30d7405b9603945cf0ac41e25cf
BLAKE2b-256 08570f44afac011391d9b2141c7688a7df6743e77c7f355f03337bdd6746b3a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec91b769037a3dc78d6f4c339c761bdf65a9b4e6293d4d2b69a6bc15b9d719bb
MD5 5ea6c5928ee730f87ddce93cc083746e
BLAKE2b-256 10bb408069a0b07d5e8f366bc8ce6b0b7bd0eddbdc1021c6d4e32668912cf860

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 774cf9dc23cbc26fed1b74d37b07d7c739533dfc81bd157212689301e88d3109
MD5 1ac08a555b6d04554bcc6c54f1d7df24
BLAKE2b-256 92aeaaa5c767be83af1ab8e9ab529ebbfbc36e937700bbcfc513f85edc15ef3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a6afde6607fff8a7c334d67ad0346d20eb399f563886c8c49f364bb1d0a72d1e
MD5 08bfa2b962c12061c202e10b2193d723
BLAKE2b-256 df86d66a39c99a2343dd26d0a908967e1a554e1cd873d5b43b023d13c20dc3b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cad24e4cc25348d2bc777cfe4e6345090d5054c9d813e5fbad4a71a1c4fffe01
MD5 3f35a59a55db55d181f13aa1db856f42
BLAKE2b-256 c20d34a4e5d5463cd049586fc27d4565a0338a9e9b9570595e1cbdcaa8ed83c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7bc03cb351e9513e9d6eeabf1309323aced011041e6b4d28fe1d46a96130965a
MD5 1f119dfb0d251ff8f4b9cbc75f3e6c9d
BLAKE2b-256 9ff8973bb132a2c6848fa0f63c6da38f0cbbe86613fb21c2aeac4c33e66c501c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f4b4f7361c6a4e14d8e4da41dff18678574533d5e7b0a88c9f4df95363dd4439
MD5 4961806a0d1fd5802ee284e57b076bf2
BLAKE2b-256 58527ae2bd11e0eb02d76289ce547e85e1f372a0f807e5493958686840b11510

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce11162b4a17a4f51a7d47202ede05a2810d02ec72d3a5eeb3c8d9700a2044db
MD5 d8d93ebf21b425b6071c99e30dad6bc0
BLAKE2b-256 959dd38828c720fcff4230157a350add177d4a4d5d6276c170bc361f93cea9ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e1a70398e7a49e3230dc5b91cf97c29f7bb3783b09af182a33883bcf43daa43b
MD5 2eb41f09ee4e992d0927f9c67b1853f1
BLAKE2b-256 f4a138c6d944c4694caac2c27566bf6295c9b6db50dc6ae9be8357291a3d69ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 311d7657a4d487a5dc5f1d289d50f719a0b35bb6dee9e8edb4f92adefd6ca8de
MD5 cb3cdce0b63e9a3443de5a76cbd990c7
BLAKE2b-256 71f4ef51afdfe959e9a245f3978953f3f8f76663a50e0e80c3b7dff56739a6cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1435b4a99066c23c8077ad1f20d5384d259c0cc44c0434927d7972f3c33a7b86
MD5 c64104928bf004df40affb806ab28b88
BLAKE2b-256 87d5915d9c72f41a4c2ffd425aff9815fecd59f1934cb208b5646190e70c808a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rustest-0.16.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.9.15 {"installer":{"name":"uv","version":"0.9.15","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.16.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 addae781092804dc0c75e7ab9b268662a23a91597ec59dbcaa4d1e600365f120
MD5 0c0e2cb820c4779bf059483aa917be9e
BLAKE2b-256 984ebb6251b370b73882dc9d69af4fa39cc718f88264866ff113a55f4613229c

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