Skip to main content

Rust-powered, drop-in replacement for pytest

Project description

rpytest

Run your pytest suite faster. Change nothing.

A Rust-powered, drop-in replacement for pytest that eliminates startup overhead while keeping your tests, fixtures, and plugins untouched.

PyPI Version License Python Versions

Why rpytest?

pytest  ->  2.91s  (480 tests)
rpytest ->  1.55s  (same 480 tests)
        =  1.9x faster

rpytest uses a persistent Rust daemon to keep Python warm between runs. No more interpreter startup costs on every invocation.

Installation

pip install rpytest

That's it. The correct native binary for your platform (macOS or Linux, Intel or Apple Silicon) is bundled automatically.

Usage

rpytest mirrors pytest's CLI exactly. If you know pytest, you know rpytest.

# Run all tests
rpytest

# Run specific tests
rpytest tests/test_api.py::test_login

# Filter by keyword or marker
rpytest -k "auth" -m "not slow"

# Parallel execution — no pytest-xdist needed
rpytest -n auto

# Watch mode for TDD
rpytest --watch

Key Features

Feature pytest rpytest
Startup time ~200ms <10ms
Memory usage 35.8 MB 6.2 MB
Parallel workers pytest-xdist plugin Built-in -n flag
Watch mode pytest-watch plugin Built-in --watch
Flakiness detection flaky plugin Built-in --reruns
Sharding pytest-shard plugin Built-in --shard
  • Full pytest compatibility — plugins, fixtures, conftest.py, pytest.ini all work unchanged
  • Built-in parallelismrpytest -n 4 or rpytest -n auto
  • Watch mode — file changes trigger automatic re-runs of affected tests
  • Flakiness detectionrpytest --reruns 3 auto-retries failed tests
  • Session fixture reuserpytest --reuse-fixtures persists expensive fixtures
  • CI shardingrpytest --shard 0 --total-shards 4

Requirements

  • Python 3.9+
  • pytest 7.0+
  • macOS or Linux

How It Works

  1. First run: Spawns a background daemon that collects your test suite
  2. Subsequent runs: Rust CLI filters tests and dispatches to warm Python workers
  3. Results stream back in real-time

The daemon persists between runs, so TDD loops and CI retries skip all startup work.

Documentation

Full docs at docs.neullabs.com/rpytest

License

MIT

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

rpytest-0.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

rpytest-0.1.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file rpytest-0.1.2.tar.gz.

File metadata

  • Download URL: rpytest-0.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rpytest-0.1.2.tar.gz
Algorithm Hash digest
SHA256 744de856d66b5e482c697ec44bb1b3a0a7394d2fe81d10ff4cbae8d0a3779d69
MD5 e7b1ad8d7be81dc69b674694f2916628
BLAKE2b-256 2233912d609cd58be9bd7a336b01f0c0f06a10e07d2ccbc1c04c14a69efd89f1

See more details on using hashes here.

File details

Details for the file rpytest-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: rpytest-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rpytest-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87ce986c541709706e86564755b36a65f392949362b5c3c6799f84216ad3356c
MD5 dae5144d615398d0ad6de4132ac769af
BLAKE2b-256 1339a9a6286fb0a104099203778a23505644c63bf1fba0741976c6c80fc84b36

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