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

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:


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:


Interactions with Other System Components


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).