release-2.3.1.rst

Overview

This file is the release notes documentation for **pytest version 2.3.1**, a minor update to the widely used Python testing framework `pytest`. It serves as a changelog and quick guide highlighting important fixes, improvements, and instructions relevant to this particular release.

The primary purpose of this file is to inform users and developers about the bug fixes and enhancements included in version 2.3.1, especially addressing a regression issue with fixture (factory) functions, platform-specific test behavior adjustments, and documentation improvements.

It is not a source code file but rather a structured text file (in reStructuredText format) intended to be consumed by developers and users to understand what changed from version 2.3.0 to 2.3.1.

Content Summary

Detailed Explanations

Regression Fix: issue202

Platform-Specific Test Adjustment

Documentation Improvement: --markers

Installation Instructions

The release notes remind users how to install or upgrade pytest:

pip install -U pytest
# or
easy_install -U pytest

This ensures users can easily move to the latest version.

Implementation Details & Algorithms

This file is a release note and does not contain executable code or algorithms. Instead, it documents changes made in source code elsewhere in the pytest project.

The main technical detail is the fix for the `self` regression in fixture functions, which internally relates to pytest's fixture handling and test class instance management. While not detailed here, it likely involves ensuring fixture factories correctly receive or bind the test class instance (`self`) as context.

Interaction with Other System Parts

Visual Diagram

Since this file is primarily a changelog/release note, a flowchart illustrating the key updates and their relationships provides the clearest structural overview.

flowchart TD
    A[pytest-2.3.1 Release]
    A --> B[Fix Regression: issue202]
    B --> B1[Restore 'self' in fixture funcs]
    A --> C[Disable pexpect tests on FreeBSD]
    C --> C1[Prevent test hangs]
    A --> D[Improve --markers docs]
    D --> D1[Add links to online help]
    A --> E[Install/Upgrade instructions]
    E --> E1[pip install -U pytest]
    E --> E2[easy_install -U pytest]

Usage Example

This file itself is not executable but to benefit from the fixes and improvements described:

  1. Upgrade pytest to version 2.3.1 using pip:

    pip install -U pytest
    
  2. Use pytest normally, now with:

    • Fixture functions correctly handling self in class-based tests.

    • Stable test runs on FreeBSD without hanging pexpect tests.

    • Enhanced help when listing markers with pytest --markers.

  3. Refer to http://pytest.org/ for detailed usage and documentation.


This documentation provides a comprehensive understanding of the [release-2.3.1.rst](/projects/286/66986) file’s purpose, contents, and the context of its updates in the pytest project.