release-2.9.1.rst
Overview
This file is the release notes documentation for **pytest version 2.9.1**, a mature and widely-used Python testing framework. It outlines the purpose of the release, highlights key bug fixes compared to the previous version (2.9.0), provides update instructions, and acknowledges contributors.
`pytest` itself is a testing tool designed to run Python tests easily and effectively, supporting multiple interpreters and platforms with a rich feature set including fixtures, parameterization, and plugins.
This particular release focuses on improving error messages, fixing Unicode/encoding-related bugs, and addressing issues with test node identification and parameterization.
Detailed Contents
Purpose of the File
To inform users about the changes, improvements, and bug fixes introduced in pytest 2.9.1.
To provide upgrade instructions.
To acknowledge contributors who helped in this release.
Release Highlights
Bug Fixes (compared to 2.9.0)
Issue | Description | Contributor(s) |
|---|---|---|
#1178 | Fix internal error when [pytest.fail](/projects/286/67266) is called with non-ASCII characters in the message. | nicoddemus |
#469 | Fix incorrect parsing of [report.nodeid](/projects/286/66996) in JUnit XML reports when parameter IDs contain `::`. | tomviner |
#578 | Fix internal errors caused by `SyntaxError`s with non-ASCII lines at the failure point. | asottile, nicoddemus |
#1437 | Fix decoding of byte-string regex patterns in parameterized tests by ignoring UTF-8 errors. | (not specified) |
#649 | Fix inability to specify parametrized test nodes on the command line. | (not specified) |
Improve error messages when plugin loading fails. | nicoddemus |
Upgrade Instructions
Users can upgrade to this release via pip:
pip install -U pytest
Contributors
A list of contributors is given to credit those who helped this release, including:
Bruno Oliveira
Daniel Hahler
Dmitry Malinovsky
Florian Bruhin
Floris Bruynooghe
Matt Bachmann
Ronny Pfannschmidt
TomV
Vladimir Bolshakov
Zearin
palaviv
Implementation Details and Algorithms
This file itself is a release notes document and does not contain executable code, classes, or functions. The main content summarizes fixes and improvements implemented in the pytest codebase for version 2.9.1, with references to issue numbers and pull requests that address specific bugs.
Key implementation notes inferred from the fixes:
Unicode/Encoding Handling: Several bugs fixed involve proper handling of non-ASCII characters in error messages and test identifiers, reflecting pytest's internationalization robustness.
JUnit XML Report Generation: Correct parsing of test node IDs ensures XML reports are accurate, especially for parameterized tests with complex IDs.
Plugin System: Improved error reporting when plugins fail to load helps developers diagnose integration issues.
Parameterization Flexibility: Fixes enable better support for bytestring regex patterns and command-line test selection with parameterized tests.
Interactions with Other System Components
pytest Core: This release affects core pytest behavior, mainly in test reporting, parameterization, and error handling.
Plugins: The improved error messages during plugin loading impact how third-party plugins integrate and report issues.
Test Suites: Users running automated tests benefit directly from the bug fixes, especially those using parameterized tests and generating JUnit reports.
Visual Diagram: Release Notes Structure
Since this file is a documentation file (not code), a flowchart illustrating the structure of the release notes and their relationships is most appropriate.
flowchart TD
A[Release Notes: pytest-2.9.1] --> B[Overview]
A --> C[Bug Fixes Summary]
A --> D[Upgrade Instructions]
A --> E[Contributors]
B --> F[pytest Purpose]
C --> G[Error message improvements]
C --> H[Unicode/Encoding fixes]
C --> I[JUnit report fixes]
C --> J[Parameterization fixes]
E --> K[List of contributors]
Usage Example
Since this is a release note, usage examples pertain to upgrading pytest:
pip install -U pytest
To verify the version after upgrade:
pytest --version
# Output: pytest 2.9.1
Summary
This file documents the **pytest 2.9.1** release, focusing on bug fixes that improve error handling, Unicode support, test parameterization, and plugin loading. It serves as a reference for developers and users to understand the incremental changes from the previous version and how to update their pytest installation.
For more details, users are directed to the official documentation at [http://pytest.org](http://pytest.org).