Metadata-Version: 2.5
Name: pytest-netscenario
Version: 0.1.0rc1
Summary: pytest plugin for netscenario: fixtures and markers to test a program on a described network
Project-URL: Repository, https://github.com/leonkrix/netscenario
Project-URL: Issues, https://github.com/leonkrix/netscenario/issues
License-Expression: MIT OR Apache-2.0
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Framework :: Pytest
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: netscenario==0.1.0rc1
Requires-Dist: pytest>=8
Description-Content-Type: text/markdown

# pytest-netscenario

A pytest plugin for [netscenario](https://github.com/leonkrix/netscenario): test a program on a described network.

```python
import pytest


@pytest.mark.netscenario("scenarios/lte-like.yaml")
def test_media_delay(netscenario_result):
    assert netscenario_result["media"].delay.p99 < 0.150  # seconds
```

The plugin gives the fixture `netscenario` (a runner), the marker `netscenario(...)`, 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** and installs the package `netscenario`, in exactly the same version.

Documentation: [docs/PYTEST.md](https://github.com/leonkrix/netscenario/blob/main/docs/PYTEST.md). The status is pre-alpha.

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