release-2.0.0.rst

Overview

This file is the release notes document for **pytest version 2.0.0**, a major release of the popular Python testing tool known previously as "py.test." It serves as a comprehensive summary of new features, improvements, bug fixes, removals, and important notes related to the pytest 2.0.0 release.

The document is intended for developers, QA engineers, and users of pytest who want to understand the enhancements and changes introduced in this version. It also guides upgrading from previous versions and highlights backward-incompatible removals and new usage patterns.


Detailed Content Breakdown

1. Purpose and Functionality

This file primarily functions as:

It is not executable code but rather a structured text document (in reStructuredText format) designed for reading and inclusion in official documentation or project changelogs.


2. Sections and Their Details

New Features

Fixes

Important Notes

Incompatible Removals


3. Implementation Details and Algorithms

Since this is a release notes file, it does not contain executable code or algorithms. However, the document hints at architectural and implementation details relevant to pytest 2.0.0:


4. Interactions with Other System Components


5. Usage Examples

**Running pytest from the command line:**

python -m pytest tests/

**Running pytest programmatically:**

import pytest

# Run pytest with custom arguments and plugins
pytest.main(['-v', 'tests/'], plugins=[])

**Using configuration file (setup.cfg or tox.ini):**

[pytest]
norecursedirs = .hg data*
addopts = -x --pyargs

6. Visual Diagram: pytest-2.0.0 Release Notes Structure

This flowchart represents the main sections of the release notes file and their relationships, illustrating the logical flow for readers.

flowchart TD
    A[Release Notes: pytest 2.0.0] --> B[New Features]
    A --> C[Fixes]
    A --> D[Important Notes]
    A --> E[Incompatible Removals]
    B --> B1[Python Interpreter Invocation]
    B --> B2[Programmatic API]
    B --> B3[Enhanced Assertion Reporting]
    B --> B4[Configuration Files Support]
    B --> B5[Improved unittest Support]
    C --> C1[Interactive Debugging]
    C --> C2[Reporting Resilience]
    C --> C3[Conftest.py Loading]
    C --> C4[Test Node Discovery]
    C --> C5[pytestmark Fixes]
    D --> D1[Legacy Usage]
    D --> D2[Collection Phase Change]
    D --> D3[Codebase Size]
    E --> E1[py.test.config Access]
    E --> E2[Deprecated Features Removed]
    E --> E3[Directory Collector Removal]

Summary

The [release-2.0.0.rst](/projects/286/66986) document is an authoritative, detailed release note for pytest 2.0.0, outlining its significant new features, bug fixes, and breaking changes. It is essential reading for users upgrading from earlier versions, plugin developers adapting to new APIs, and anyone interested in the evolution of the pytest testing framework.

By following the installation instructions and reviewing the documented changes, users can leverage improved testing capabilities, enhanced configurability, and better integration with Python’s ecosystem provided by this major release.