Metadata-Version: 2.4
Name: natsio-testing
Version: 0.1.0
Summary: nats-server process management for tests — start, stop, and fault-inject real servers
Keywords: nats,nats.io,testing,pytest,nats-server
Author: Corrupt Mane
Author-email: Corrupt Mane <corruptmane@gmail.com>
License-Expression: Apache-2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AsyncIO
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Dist: natsio
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/corruptmane/natsio
Project-URL: Repository, https://github.com/corruptmane/natsio
Project-URL: Changelog, https://github.com/corruptmane/natsio/blob/main/extensions/natsio-testing/CHANGELOG.md
Description-Content-Type: text/markdown

# natsio-testing

Run real `nats-server` processes from your test suite: start/stop, temporary
config files, free-port allocation, readiness probing (plaintext and
TLS-handshake-first), and fault injection (`kill()`).

```python
from natsio.testing import NatsServerProcess

async def test_against_a_real_server():
    server = await NatsServerProcess(binary="nats-server").start()
    try:
        nc = await natsio.connect(server.url)
        ...
    finally:
        await server.stop()
```

Binary discovery: pass `binary=` explicitly, or use `find_server_binary()`
(checks `NATS_SERVER_BIN`, then `nats-server` on `PATH`).

Part of the natsio extension tier: distribution `natsio-testing`, imported as
`natsio.testing`. Pre-1.0, no API-stability promises.
