Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pytest-telescope

Declared inputs. Isolated tests. Focused reruns.

Put input declarations beside pytest cases. Each actual case, including each parametrized variant, runs in a fresh Linux Docker worker and has its own reusable successful result. Two cases in the same file can declare different resources and rerun independently.

import pytest


@pytest.mark.telescope(inputs=["data/red.json"], bundles=["pricing"])
def test_red(): ...


@pytest.mark.telescope(inputs=["data/blue.json"], bundles=["pricing"])
def test_blue(): ...

Unmarked cases see and hash the whole project-file snapshot. Literal inputs or bundles marker fields narrow that scope. Declarations at module, class, function, and parameter levels add together with project defaults. cache=False alone stays broad. The containing test source and configuration are always included.

Try it

Requirements: Linux, Python 3.11+, and permission to build/run Linux containers through a local Docker daemon's Unix socket. Runtime preparation needs network; workers have no network.

python -m venv .venv
. .venv/bin/activate
python -m pip install pytest-telescope==0.1.0a2

Follow the complete runnable quickstart for copyable application code, tests, JSON, and TOML. It demonstrates cold/warm reuse, same-file independent inputs, parameter-specific declarations, shared bundles, broad invalidation, and an undeclared read failure. The base files are also in examples/quickstart.

From your configured project root:

python -m pytest_telescope runtime
python -m pytest_telescope plan
python -m pytest_telescope run --explain -- -q
python -m pytest_telescope run --explain -- -q

plan previews static scopes. run collects actual cases inside an isolated worker; each execution then starts with only that case's scope. A warm inventory/result hit starts no worker containers. Summaries distinguish collection, fresh execution, cached results, failures, and unselected cases. New files or parametrized cases cannot hide behind an old result.

Know the boundary

Every case gets a fresh pytest session, so module/class/session fixtures are recreated per case. Tests relying on cross-case mutable state need rewriting. Shared import and parametrization resources must be declared for every narrow consumer, typically in project defaults or bundles. Application files and host virtual environments are not installed into the prepared runtime.

Filesystem isolation does not establish universal determinism. Make clock, randomness, and native/external-state assumptions reproducible or mark affected cases cache=False. Use run --force to execute again or run --no-cache to bypass reuse and recording.

The dedicated CLI starts no host pytest session. pytest --telescope also routes to workers, but other plugins may execute during host pytest startup. pytest --telescope-plan is a static planning adapter. Ordinary pytest stays ordinary when telescope mode is disabled; -p no:telescope disables plugin loading entirely.

Version note: 0.1.0a2 uses the marker interface. Immutable 0.1.0a1 used file/group targets; central targets declarations must migrate to markers, defaults, and bundles. The benchmark records measured per-case cold/warm and selective reruns, including broad-case costs.

See the marker/project reference, execution contract, development guide, and publishing guide. Licensed under the MIT License.

Metadata

Release files for pytest-telescope 0.1.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-telescope 0.1.0a2
File Size Uploaded Provenance
pytest_telescope-0.1.0a2.tar.gz 83.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-telescope 0.1.0a2
File Interpreter ABI Platform
pytest_telescope-0.1.0a2-py3-none-any.whl Python 3 none any Details

Total release size: 119.9 kB

Release files / pytest_telescope-0.1.0a2.tar.gz

Download URL pytest_telescope-0.1.0a2.tar.gz
Size 83.4 kB
Tags Source
SHA-256 checksum
How to use checksums
508313fcb16910fa456487d51cbc1959592005b0f6f85727362b97ff0a920b5a
BLAKE2b-256 checksum
How to use checksums
890e3361b0c5d217e46d57a00bd8b0c6d73963064c704d8afed3b5056c2aca79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pytest_telescope-0.1.0a2-py3-none-any.whl

Download URL pytest_telescope-0.1.0a2-py3-none-any.whl
Size 36.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
563a1220a478ada5932f33f0ce32182d72965a69e94b733c3ed2b39d157c249a
BLAKE2b-256 checksum
How to use checksums
99a14c9ab7e235d618c66df54eb71cdb0af54e467decb378eb6d3e9bc3bd163c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for pytest-telescope 0.1.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page