Registry / testing / pytest-bazel

pytest-bazel

JSON →
library0.1.6pypypiunverified

A pytest plugin that collects and runs tests in Bazel workspaces. Currently at version 0.1.6 with no active maintenance; last release was in 2020. Works by integrating pytest with Bazel's test runner, enabling parallel execution and caching. Suitable for Python projects using Bazel as their build system.

pip install pytest-bazel
INSTALL
IMPORT
SIG · PYTEST-BAZEL
P
pytest-bazel
testingpythonv0.1.6
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_bazel
✓ pytest_bazel is a plugin; no direct import needed. Use `--bazel` flag with pytest.
✗ import pytest_bazel
Do not import directly; plugin is auto-discovered when installed.

Run pytest with Bazel support.

# Ensure pytest-bazel is installed # Add to BUILD file or run: pytest --bazel --bazel-python=$(which python) tests/
Debug
Known issues
deprecatedpytest-bazel is no longer actively maintained. Consider migrating to `rules_python` or `bazel_pytest`.
fix
Switch to `rules_python` integration with native pytest support, or use `pip install bazel_pytest` for an alternative.
affects: all
gotchaThe plugin requires that Bazel and Python are on PATH. Misconfiguration may lead to 'Bazel not found' errors.
fix
Ensure Bazel is installed and available in your shell environment.
affects: all
Upgrade
Version history
0.1.6latest on PyPI · released Oct 31, 2025
Audit
Dependencies
pytestrequiredRequired as the testing framework
Agent activity
5 hits · last 30 days
node
4
Resources
pytest-bazel — pip install pytest-bazel · libregistry