Skip to main content

Pytest report plugin for Zulip

Project description

pytest-zulip

Pytest report plugin for Zulip

Allow to send notification on Zulip chat product.

installation

pip install pytest-zulip

Configure via env var

ZULIP_URL="https://x.zulipchat.com/api/v1/messages"
ZULIP_BOT_EMAIL_ADDRESS="bot@x.zulipchat.com"
ZULIP_BOT_API_KEY="API_KEY"
ZULIP_TOPIC="TOPIC"
ZULIP_STREAM="STREAM"

Optional:

ZULIP_ELLIPSIS_CHAR="…"
ZULIP_ONLY_ON_FAILED=1

Add option to send message

pytest --notify-zulip

Modify content via hook

def pytest_zulip_create_content(session: Session, exitstatus: Union[int, ExitCode]) -> str:
    reporter = session.config.pluginmanager.get_plugin('terminalreporter')
    return str(reporter.stats.get('passed', []))

Dev

Change version

edit

pytest_zulip/__init__.py

commit

git commit -m "v0.1.0"

tag

git tag v0.1.0

Build package

python setup.py sdist bdist_wheel
pip install twine
twine upload dist/*

Project details


Download files

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

Source Distribution

pytest-zulip-0.2.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

pytest_zulip-0.2.1-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page