Tryke
Highlights
- Fast Rust-powered test discovery
- Concurrent tests by default
- Pretty, per-assertion diagnostics
- Soft assertions (like pytest-check)
- Native
asyncsupport — no plugin - Watch mode
- Changed mode (like pytest-picked)
- Client/server mode for fast editor integrations
- Fixtures with setup / teardown and typed
Depends()injection - Parametrized tests via
@test.cases - Grouping with
describe()blocks skip,skip_if,xfail, andtodomarkers- In-source testing
- Support for doctests
- Filtering and marks
- Reporters — text, dot, json, junit, llm, nextest-style, and pytest-sugar-style
Getting started
Run tryke with uvx to get started quickly:
uvx tryke
Or, check out the tryke playground to try it out in your browser.
To learn more about using tryke, see the documentation.
from typing import Annotated
from tryke import Depends, describe, expect, fixture, test
@fixture(per="scope")
def database():
db = {}
yield db
db.clear()
with describe("users"):
@fixture
def users(database: Annotated[dict[str, dict[str, str]], Depends(database)]):
database["users"] = {}
return database["users"]
with describe("get"):
@test("returns a stored user")
async def test_get(users: Annotated[dict[str, str], Depends(users)]):
users["alice"] = "alice@example.com"
expect(users["alice"], name="returns stored email").to_equal(
"alice@example.com"
)
with describe("set"):
@test("stores a new user")
async def test_set(users: Annotated[dict[str, str], Depends(users)]):
users["bob"] = "bob@example.com"
expect(users["bob"], name="stores email under user key").to_equal(
"bob@example.com"
)
Run the tests:
uvx tryke test # run once
uvx tryke # watch mode
Coming from pytest?
The migration guide has a side-by-side cheat sheet and a copy-paste LLM prompt.
License
This repository is licensed under the MIT License.
Metadata
Release files for tryke 0.0.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tryke-0.0.30-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| tryke-0.0.30-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| tryke-0.0.30-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 11.5 MB
Release files / tryke-0.0.30-py3-none-win_amd64.whl
| Download URL | tryke-0.0.30-py3-none-win_amd64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b69c451bb656ae490e5d6aeea1362b00131bac516f1fb411e3b28c212cc92e67
|
|
BLAKE2b-256 checksum How to use checksums |
d1fc17368eab238139ff0f56e0c2864d5bb7ec28ef251fe87d165fbe90fb54e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
|
Release files / tryke-0.0.30-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tryke-0.0.30-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
91b26eccfb33bf39323566a351e6039cf526093ee53d44b73a7e5796c46aa22b
|
|
BLAKE2b-256 checksum How to use checksums |
cc2c6a2b8f25f1a73a744fdd258b2b29d9751458286a456e2daa7b9757d3e8b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
|
Release files / tryke-0.0.30-py3-none-macosx_11_0_arm64.whl
| Download URL | tryke-0.0.30-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.8 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9a9777eaab5a37c5736000f2195fc01365e0317485e9a819c301a714c74f7055
|
|
BLAKE2b-256 checksum How to use checksums |
426afa4d3639e2d95c3bc4f1974841a5de6cd348cfbe2a1376addc32e3212de9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
|