release-2.4.2.rst

Overview

This file is the release announcement notes for **pytest version 2.4.2**, a bug-fixing update to the popular Python testing framework. It provides a summary of key bug fixes, improvements, and new APIs introduced in this patch release, aimed at improving plugin compatibility, Windows support, test discovery accuracy, and fixture behavior.

The document serves as an official communication to developers and users about what has changed, what issues have been resolved, and how to upgrade pytest safely.

Key highlights of this release include integration with the `colorama` library for improved terminal color handling on Windows, fixes to the `-k` test selection matching, better filename handling in the `tmpdir` fixture, and enhancements to plugin APIs.


Detailed Explanation

Content Type

This file is a **release notes document**, written in reStructuredText (RST), suitable for display on project websites, PyPI, or internal changelogs.


Sections & Details

1. Windows color support via colorama

2. Fix -k option test matching

3. tmpdir fixture filename length fix

4. pytest-pep8 and pytest-flakes plugin compatibility fixes

5. New node marker API

6. Removal of stdout duplication at startup

7. Plugin manager enhancement


Usage Example

Since this file is a release notes document, it is **not executable code** and does not contain functions or classes. However, users should:


Implementation Details & Algorithms

This file itself is a plain text changelog and does not implement algorithms or classes. The notes mention internal changes in pytest core, such as:


Interactions with Other System Components


Visual Diagram

Since this file is a **release documentation file** and does not define classes or functions, a class diagram is not applicable. Instead, a **flowchart representing the key updates and their relationships** is appropriate to illustrate the release structure.

flowchart TD
    A[pytest 2.4.2 Release]
    A --> B[Windows Terminal Color Fix]
    B --> B1[colorama dependency added]
    
    A --> C[-k Option Matching Fix]
    C --> C1[Improved test selection accuracy]
    
    A --> D[tmpdir Fixture Fix]
    D --> D1[Shorter filenames with parametrization]
    
    A --> E[Plugin Compatibility]
    E --> E1[Fix pytest-pep8 & pytest-flakes]
    E --> E2[Add node.get_marker() and node.add_marker()]
    E --> E3[pluginmanager.do_configure() added]
    
    A --> F[Stdout Duplication Removed]
    F --> F1[Rely on standard capturing mechanisms]

Summary

This release notes file for pytest 2.4.2 documents important bug fixes and enhancements focusing on:

It is intended for pytest users and plugin developers to understand what has changed and how to upgrade. The file itself is a static changelog and does not contain executable code or classes.

For detailed usage of new APIs and features, users should consult the official pytest documentation at [http://pytest.org](http://pytest.org).