Skip to main content

pytest-netscenario

A pytest plugin for netscenario: run a network scenario as a test and assert on loss, delay and throughput.

pip install pytest-netscenario     # also installs netscenario, in exactly the same version
# test_video_call.py, next to video-call.yaml
def test_the_video_arrives_in_time(netscenario):
    video = netscenario.run("video-call.yaml")["video"]
    assert video.loss_ratio < 0.05
    assert video.delay.p99 < 0.100  # seconds

The plugin gives the fixture netscenario (a runner that finds the scenario file next to the test), the marker netscenario(...) with the fixture netscenario_result, a guard that skips (or, on a CI, fails) when the machine cannot create network namespaces, and a section in the report with the numbers of each run. It needs Linux with the tools and rights that netscenario doctor checks (permissions).

A complete example with its scenario file and its output: examples/python-test. Documentation: docs/PYTEST.md. The status is pre-alpha.

Licensed under either of Apache License 2.0 or MIT, at your option.

Metadata

Release files for pytest-netscenario 0.1.0

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-netscenario 0.1.0
File Size Uploaded Provenance Actions
pytest_netscenario-0.1.0.tar.gz 13.4 kB With provenance Details for pytest_netscenario-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-netscenario 0.1.0
File Interpreter ABI Platform Actions
pytest_netscenario-0.1.0-py3-none-any.whl Python 3 none any Details for pytest_netscenario-0.1.0-py3-none-any.whl

Total release size: 26.0 kB

Release files / pytest_netscenario-0.1.0.tar.gz

Download URL pytest_netscenario-0.1.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6bbcf62ce22bf4ada27cb0da319d82609fce71a0c00a06ffcfbbfa3d86658326
BLAKE2b-256 checksum
How to use checksums
ccaa5349bd4dfd74f9f8ad8dd531e8f2f29a72c4898d926f116edaf3c9e3665b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / pytest_netscenario-0.1.0-py3-none-any.whl

Download URL pytest_netscenario-0.1.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
349708788f68047c89dd031109db3c2ae0c15edd814bd9c7d04f182354ce2436
BLAKE2b-256 checksum
How to use checksums
d5eff6522765a9a136e2089823660c764561f2a9870c1df015384ba0a6df2332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for pytest-netscenario 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pytest_netscenario-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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