skillfed

zope.testrunner

Zope testrunner script.

zope-testrunner v8.3 116.9K downloads/30d#12,190 on PyPI3
License unclear ZPL-2.1 Active released

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 on this page — 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

zope-testrunner on PyPI

pip

pip install zope-testrunner

uv

uv add zope-testrunner

poetry

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 the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — zope.exceptions, zope.interface
Maintenance actively maintained — 15 days since the last release
Last repo commit
First released
Downloads 116,870/month — #12,190 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: zope_testrunner-8.3-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Zope :: 3Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Tags

python test runnerunittest test runnertest layer supportdoctest runnertest coverage profilingparallel test executionzope testing framework
test-runnerlayer-supportzope-ecosystem

More Python Modules packages