skillfed

zope.testing

Zope testing helpers

zope-testing v6.2 257.0K downloads/30d#8,452 on PyPI4
License unclear ZPL-2.1 Active released

What it is and what it does

zope.testing is a collection of testing utilities built around doctest and unittest workflows. It provides helpers for common testing patterns: cleanup mixins for tests that modify global state, HTML form parsing for functional tests, logging output verification, and setup/teardown automation via setupstack. The package also includes output normalization via regex patterns (useful for doctests with non-deterministic output) and a timing utility for handling race conditions.

The package is designed primarily for doctest-heavy projects and Zope framework users, though its individual modules (like renormalizing and setupstack) can be used standalone. It has no runtime dependencies, making it lightweight to add to a test suite. Recent versions have deprecated doctestcase in favor of Python's built-in doctest module, signaling a shift toward standard library patterns.

Use it for:

  • Verify logging output in unit tests using loggingsupport handlers.
  • Extract and validate form data from HTML responses in functional tests with formparser.
  • Normalize doctest output with regex patterns to handle timestamps or variable data.
  • Automate setup and teardown in doctests using setupstack to avoid global state pollution.
  • Handle timing-dependent test failures with the wait utility for non-deterministic operations.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides testing utilities and frameworks for Python, including doctest support, form parsing, logging verification, and setup/teardown automation.

Yes. zope.testing is actively maintained, has zero known vulnerabilities, requires no external dependencies, and supports current Python versions (3.10+). It is worth installing if you use doctests or need any of its specialized testing utilities (form parsing, logging verification, output normalization). If you only use unittest or pytest with standard patterns, you may not need it.

Install

zope-testing on PyPI

pip

pip install zope-testing

uv

uv add zope-testing

poetry

poetry add zope-testing

Installing zope.testing

Before you install

Low install friction with no runtime dependencies. Actively maintained with recent releases; latest version 6.2 added Python 3.15 support and moved metadata to pyproject.toml.

License in practice

Licensed under ZPL-2.1 (Zope Public License 2.1), a permissive open-source license with no notable restrictions for most use cases.

Quickstart

pip install zope.testing

from zope.testing import setupstack
from zope.testing.renormalizing import OutputChecker

# Use setupstack for doctest setup/teardown automation
# Use OutputChecker for regex-based output normalization in tests

Requires Python 3.10 or later.

Verify before relying

  • Whether formparser HTML extraction works with modern HTML5 parsers or only legacy HTML.
  • Performance characteristics when used with large test suites or complex doctest files.
  • Compatibility with test runners other than nose (e.g., pytest, unittest discovery).

Package facts

License ZPL-2.1 (unclear)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 42 days since the last release
Last repo commit
First released
Downloads 256,994/month — #8,452 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: zope_testing-6.2-py3-none-any.whl

Keywords: zope, testing, doctest, RENormalizing, OutputChecker, timeout, logging

Development Status :: 5 - Production/StableFramework :: Zope :: 3Framework :: Zope :: 4Framework :: Zope :: 5Intended 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

doctest utilitiestesting helpersform parser testinglogging test supportdoctest setup teardownoutput normalization testinghtml form extraction
doctesttesting-utilitieszope-framework

More Python Modules packages