--- id: zope-testrunner version: "8.3" license: ZPL-2.1 license_treatment: unclear maintenance: active --- # zope.testrunner — Zope testrunner script. License: unclear · Maintenance: active · Downloads: 116.9K/mo ## What it is and what it does zope.testrunner is a flexible test runner designed for Python projects that need more control over test organization and execution than the standard unittest runner provides. It discovers and runs unittest.TestCase tests and doctests, and organizes them into layers—groups of tests that share setup and teardown code executed once per layer rather than per test. The runner supports filtering tests by package, module, or name pattern; grouping slow tests into levels; measuring coverage; profiling; and running tests in parallel. The package is typically used in buildout-based projects via zc.recipe.testrunner, which generates a test script, or installed directly into a virtualenv and invoked from the command line. It expects tests to live in a tests subpackage or module within your source tree, following standard naming conventions. It integrates with zope.exceptions and zope.interface for error handling and interface support, and provides a rich set of command-line options for controlling test discovery, verbosity, debugging, and output formats including XML reports. Use it for: - Run tests organized into layers with shared setup/teardown to avoid redundant initialization across test groups - Filter and run specific tests by package, module, or name pattern without modifying code - Measure test coverage and profile test execution to identify slow or resource-intensive tests - Debug test failures interactively with post-mortem debugging enabled via --pdb - Generate XML test reports for CI/CD integration and test result tracking - Run tests in parallel across multiple processes to speed up large test suites ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A test runner for Python projects with support for test layers, filtering by package/module/name, coverage measurement, profiling, and parallel execution. Yes, if you are working within the Zope ecosystem or need test layer support and advanced filtering. The package is actively maintained, has low install friction, and supports current Python versions. However, verify the ZPL-2.1 license terms for your use case, and consider whether its layer-based organization and command-line interface fit your testing workflow better than pytest or unittest alone. ## Install pip install zope-testrunner uv add zope-testrunner poetry add zope-testrunner ## Installing zope.testrunner Before you install: Low install friction; pure Python wheel with only two runtime dependencies (zope.exceptions and zope.interface). Actively maintained with a release 15 days ago; supports current Python versions from 3.10 through 3.14. License in practice: Licensed under ZPL-2.1 (Zope Public License 2.1), but license treatment is marked unclear in the metadata. Verify the actual license terms before use in proprietary or restricted-license projects. Quickstart: pip install zope.testrunner zope-testrunner --test-path=path/to/your/source/tree # Or in code: import unittest from zope.testrunner import runner runner.run(unittest.TestLoader().discover('tests')) Requires Python 3.10 or later. Source code must be importable from the test path (install with pip install -e . or equivalent). Verify before relying: - Whether the unclear license treatment affects commercial use or redistribution - Performance characteristics when running tests in parallel across large suites - Compatibility with modern pytest ecosystem and pytest plugins ## Package facts - License: ZPL-2.1 (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 116.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python test runner, unittest test runner, test layer support, doctest runner, test coverage profiling, parallel test execution, zope testing framework, test-runner, layer-support, zope-ecosystem [View on SkillFed](https://skillfed.io/packages/zope-testrunner) · [View on PyPI](https://pypi.org/project/zope-testrunner/)