Skip to main content

pytest-channelstack

pytest fixtures and expect(...) checks for channelstack, a test harness for the apps and agents you build for Slack, GitHub, Linear, Notion, Resend, Gmail and Discord. You get a fixture per platform and one for the fake OpenAI your agent's model talks to, one session per test, and checks that wait for your app the way a person would.

Install

pip install pytest-channelstack
npm i -g channelstack

It needs Python 3.12 or later, and installs the channelstack Python SDK, pytest and pytest-asyncio with it. It registers itself as a pytest plugin, so there is nothing to import in conftest.py. The server comes from npm (or the GitHub releases); start it with channelstack.

A first test

import re

from channelstack import SlackFixture
from pytest_channelstack import expect


async def test_a_mention_gets_one_reply_in_the_thread(slack: SlackFixture) -> None:
    ana = await slack.create_user(name="Ana")
    channel = await slack.create_channel(participants=[ana, slack.app])

    msg = await ana.say("@my-agent summarize the incidents", channel=channel)

    await expect(msg.thread).to_have_reply_from("my-agent", text=re.compile("summarize the incidents"))
    await expect(msg.thread).to_have_replies_from(slack.app, count=1)
    await expect(channel).not_to_have_channel_message_from("my-agent")

Every test and fixture runs on one event loop, which pytest-asyncio's settings set up. The pytest guide has the configuration and the rest.

MIT licensed.

Metadata

Release files for pytest-channelstack 0.2.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-channelstack 0.2.0
File Size Uploaded Provenance Actions
pytest_channelstack-0.2.0.tar.gz 57.6 kB Without provenance Details for pytest_channelstack-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-channelstack 0.2.0
File Interpreter ABI Platform Actions
pytest_channelstack-0.2.0-py3-none-any.whl Python 3 none any Details for pytest_channelstack-0.2.0-py3-none-any.whl

Total release size: 78.5 kB

Release files / pytest_channelstack-0.2.0.tar.gz

Download URL pytest_channelstack-0.2.0.tar.gz
Size 57.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7e494d13a653466b80865be5b1c9da62fb3d39900dfeec906d5092248450f361
BLAKE2b-256 checksum
How to use checksums
ba30b05d63bc074c474422c09b01f2c83047701a19adcdba9fe171afd70db700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pytest_channelstack-0.2.0-py3-none-any.whl

Download URL pytest_channelstack-0.2.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73aa8a6a28e3ce565f16cccd5dd2f89904d18b2fc4221705336a54184ddabd4f
BLAKE2b-256 checksum
How to use checksums
6fb591585a2aa7c6e68cf6752c5ec667c745200c834eb893295df11ba00903c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pytest-channelstack 0.2.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.

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.

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