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 and Gmail. You get a fixture per platform, 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.
Links
MIT licensed.
Metadata
Release files for pytest-channelstack 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest_channelstack-0.1.1.tar.gz | 27.1 kB | Without provenance | Details for pytest_channelstack-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_channelstack-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pytest_channelstack-0.1.1-py3-none-any.whl |
Total release size: 42.6 kB
Release files / pytest_channelstack-0.1.1.tar.gz
| Download URL | pytest_channelstack-0.1.1.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf16fc981b044c9c24dca176427ade163f224a9fb33b10f7f978c9d2dac7974f
|
|
BLAKE2b-256 checksum How to use checksums |
cbd27d0eb35ed0a7a150ac517126c2c0c8238a43d033d7ea93923a04fb978488
|
| 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.1.1-py3-none-any.whl
| Download URL | pytest_channelstack-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e80015f903f907919815108c8281362f15e0b15dea2ba893f579e6341eec6e2
|
|
BLAKE2b-256 checksum How to use checksums |
f644d308f10d0635c1a191ebd942d50beef7a3e4898415d17d2cd59fd260fdde
|
| 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.1.1
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.