--- id: zope-testing version: "6.2" license: ZPL-2.1 license_treatment: unclear maintenance: active --- # zope.testing — Zope testing helpers License: unclear · Maintenance: active · Downloads: 257.0K/mo ## 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 above — 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 pip install zope-testing uv add zope-testing 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_current - Install friction: low - Maintenance: active - Downloads: 257.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags doctest utilities, testing helpers, form parser testing, logging test support, doctest setup teardown, output normalization testing, html form extraction, doctest, testing-utilities, zope-framework [View on SkillFed](https://skillfed.io/packages/zope-testing) · [View on PyPI](https://pypi.org/project/zope-testing/)