release-2.1.3.rst
Overview
This file represents the release notes for **pytest version 2.1.3**, a minor maintenance update to the popular Python testing tool **pytest** (formerly known as *py.test*). Pytest is widely used for unit, functional, and integration testing in Python projects.
The purpose of this file is to document the changes, fixes, and enhancements introduced in the 2.1.3 release, along with installation instructions and acknowledgments. It serves as a reference for users upgrading from previous versions and for maintainers tracking the software evolution.
Detailed Content Explanation
General Description
Version: 2.1.3
Nature: Minor backward-compatible maintenance release
Focus: Bug fixes and enhancements to assertion reporting capabilities
Documentation Reference: http://pytest.org/
Installation Instructions
The file provides two simple commands to install or upgrade pytest using Python package management tools:
pip install -U pytest
# or
easy_install -U pytest
Acknowledgments
Thanks are extended to bug reporters and contributors:
Ronny Pfannschmidt
Benjamin Peterson
Floris Bruynooghe
Holger Krekel (lead maintainer)
Change Log Between 2.1.2 and 2.1.3
The release notes list specific bug fixes and improvements:
Issue | Description |
|---|---|
#79 | Fixed assertion rewriting bug causing failures in boolean ops. |
N/A | Correct handling of zero length arguments in pytest calls. |
#67 | junitxml output now records correct test durations. |
#75 | Fixed skipping test failure specific to Jython environment. |
#77 | Enhanced `assertrepr_compare` hook to apply selectively per test. |
Implementation Details
Since this file is a release note, it contains no executable code, classes, or functions. However, it documents important fixes related to:
Assertion rewriting mechanism: Core pytest feature that transforms assert statements to provide detailed introspection on test failures.
Test duration reporting in junitxml output: Ensures accurate timing for integration with CI tools.
Selective assertion reporting customization: Allows configuration of assertion failure messages to be customized on a per-directory basis, improving usability and maintainability of large test suites.
Interactions with Other System Components
pytest Core: The fixes and enhancements described impact the core pytest engine, particularly the assertion rewriting subsystem and reporting modules.
JUnit XML Reporting: The fix to duration reporting affects integration with continuous integration (CI) systems consuming junitxml reports.
Test Hooks: The
assertrepr_comparehook is a pytest extension point allowing plugins or users to customize assertion output, now improved for scoped application.Installation Tools: References to
pipandeasy_installguide users to update the pytest package from Python's package ecosystem.
Usage Examples
Since this is a release note file, it does not contain code or usage examples itself. Users can refer to the official pytest documentation at [pytest.org](http://pytest.org/) to see examples of:
Writing tests using
assertstatements.Customizing assertion failure reports using
assertrepr_comparehooks.Generating junitxml reports for CI tools.
Visual Diagram: Release Notes Structure
The file can be conceptually represented as a simple hierarchical document with sections:
flowchart TD
A[release-2.1.3.rst] --> B[Overview]
A --> C[Installation Instructions]
A --> D[Acknowledgments]
A --> E[Change Log]
E --> E1[Fix: Assertion rewriting (Issue 79)]
E --> E2[Fix: Zero length args handling]
E --> E3[Fix: junitxml test durations (Issue 67)]
E --> E4[Fix: Skipping test on Jython (Issue 75)]
E --> E5[Fix: assertrepr_compare hook scope (Issue 77)]
Summary
This file documents the pytest 2.1.3 release.
Contains important bug fixes improving assertion rewriting, reporting accuracy, and test skipping.
Provides installation commands for upgrading pytest.
Acknowledges contributors and bug reporters.
Serves as a change log and communication artifact between pytest developers and users.
For detailed usage and API information of pytest itself, users should consult the official pytest documentation and source code repositories.
**End of release-2.1.3.rst documentation**