Registry / testing / pytest-tinybird

pytest-tinybird

JSON →
library0.5.0pypypi✓ verified 86d ago

A pytest plugin that reports test results to Tinybird. Version 0.5.0 adds optional report parameters for multi-repository/multi-workflow. Release cadence is irregular.

pip install pytest-tinybird
INSTALL
IMPORT
SIG · PYTEST-TINYBIRD
P
pytest-tinybird
testingpythonv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pytest_tinybird
import pytest_tinybird
Plugin is automatically loaded by pytest; explicit import not required.

Basic setup: set TINYBIRD_TOKEN and TINYBIRD_DATASOURCE, then run pytest. Plugin automatically sends test results to Tinybird.

# Install: pip install pytest-tinybird # Set environment variables import os os.environ['TINYBIRD_TOKEN'] = 'your_token' # Required: Tinybird Events API token os.environ['TINYBIRD_DATASOURCE'] = 'pytest_results' # Required: Datasource name os.environ['TINYBIRD_API_URL'] = 'https://api.tinybird.co' # Optional, default shown # Run pytest with the plugin (enabled by default) # Example: pytest --tb=short tests/
pytest --version
Debug
Known issues
gotchaThe plugin uses TINYBIRD_TOKEN environment variable, not a config file. Ensure you set it before running pytest.
fix
Set TINYBIRD_TOKEN in your shell or CI environment.
affects: all
gotchaIn v0.4.0, a retry mechanism was added; if data is not acknowledged, it may be duplicated.
fix
Set TINYBIRD_WAIT=true to wait for Tinybird acknowledgment and reduce duplicates.
affects: >=0.4.0
deprecatedThe default wait strategy is 'false' (no wait). In future versions, default may change.
fix
Explicitly set TINYBIRD_WAIT environment variable as needed.
affects: >=0.3.0
gotchaTimeout defaults to 2 seconds. Large test suites may cause timeouts; adjust with TINYBIRD_TIMEOUT.
fix
Set TINYBIRD_TIMEOUT to a higher value (e.g., 10) if you experience failures.
affects: >=0.3.0
Errors
Common errors & fixes
pytest: error: unrecognized arguments: --tinybird
The plugin does not add custom command-line arguments; it uses environment variables only.
fix
Remove --tinybird from pytest command. Configure via env vars: TINYBIRD_TOKEN, TINYBIRD_DATASOURCE.
Modulenotfounderror: No module named 'pytest_tinybird'
The package is not installed or import is attempted explicitly.
fix
Install with pip: pip install pytest-tinybird. The plugin is auto-loaded; no explicit import needed.
OSError: [Errno 0] Error: Could not find TINYBIRD_TOKEN
Missing required environment variable.
fix
Set TINYBIRD_TOKEN environment variable before running pytest.
Upgrade
Version history
0.5.0latest on PyPI · released May 7, 2025
Audit
Dependencies
pytestrequiredRequired to run tests and collect results.
Agent activity
4 hits · last 30 days
node
4
Resources
pytest-tinybird — pip install pytest-tinybird · libregistry