Skip to main content

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()).

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

natsio_testing-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

natsio_testing-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file natsio_testing-0.1.0.tar.gz.

File metadata

  • Download URL: natsio_testing-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for natsio_testing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c6bf4a32f56a623aec94b19db20f06cec41b28c23dca6bb08d51260f477f85b
MD5 f3f7fe4f5c02f9ac19882bce0e21009c
BLAKE2b-256 4a1984471ed30b2ee3eb96799dc149f430fec4b2cc17c04bf97836cf620ba88f

See more details on using hashes here.

Provenance

The following attestation bundles were made for natsio_testing-0.1.0.tar.gz:

Publisher: release-extension.yml on corruptmane/natsio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file natsio_testing-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: natsio_testing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for natsio_testing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73d4da662474849e45f608d06329d9e6302b7903d6b08d94ea499d1adc58c381
MD5 2f7e5e5acacd52571f3f6d34ebcdcddc
BLAKE2b-256 a342cc62367845dcc49ac0b2b506a08219e5e9060d5a8188560e68b1af8ce641

See more details on using hashes here.

Provenance

The following attestation bundles were made for natsio_testing-0.1.0-py3-none-any.whl:

Publisher: release-extension.yml on corruptmane/natsio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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