awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
pytest-dev avatar

pytest-dev/pytest

0
View on GitHub↗
13,645 stars·3,024 forks·Python·mit·8 vuespytest.org↗

Pytest

pytest est un framework de test pour Python qui fournit un exécuteur en ligne de commande pour découvrir et exécuter des suites de tests. Il est construit sur une architecture modulaire qui utilise les assertions standard du langage pour vérifier l'exactitude du code, inspectant automatiquement les expressions pour fournir des rapports d'échec détaillés sans nécessiter de méthodes d'assertion spécialisées.

Le framework se distingue par un système d'injection de dépendances qui gère la logique de configuration et de nettoyage en résolvant et en injectant automatiquement les ressources dans les fonctions de test. Il dispose également d'une architecture de plugins basée sur des hooks qui permet une personnalisation approfondie du cycle de vie des tests, y compris la collecte, l'exécution et le reporting. Ces capacités sont soutenues par la paramétrisation dynamique, qui génère plusieurs instances de test à partir d'une seule définition, et la mise en cache de l'état persistant qui permet de relancer sélectivement les tests ayant échoué entre les sessions.

Au-delà de son modèle d'exécution principal, le projet offre une suite complète d'outils pour gérer les environnements de test, y compris la capture de sortie, la gestion des logs et la validation des avertissements. Il prend en charge des scénarios de test complexes grâce à des fonctionnalités telles que la gestion des fichiers temporaires, le patching d'objets et la capacité d'exécuter nativement des suites de tests existantes provenant d'autres frameworks. La configuration est gérée via des fichiers centralisés, permettant un contrôle précis sur la découverte, le filtrage et le comportement d'exécution des tests.

Le projet est distribué en tant que paquet Python standard et inclut une documentation étendue sur sa configuration, son système de plugins et son interface en ligne de commande.

Features

  • Test Frameworks - Provides a testing framework for Python that uses standard language assertions and a modular fixture system to verify code correctness.
  • Dependency Injection - Provides a mechanism for managing setup and teardown logic by injecting reusable resources and state into test functions as arguments.
  • Data-Driven Parametrization - Generates multiple test instances from a single function definition by injecting varied input datasets during the collection phase.
  • Test Execution Runners - Provides a command-line tool that automatically discovers and executes test suites based on naming conventions and configuration files.
  • Test Fixture Systems - Provides a powerful dependency injection system that automatically resolves and injects test resources as function arguments.
  • Fixture Definitions - Creates setup and teardown logic that can be injected into test functions via dependency injection or automatic activation.
  • Execution Assertions - Uses standard language assertions to validate code behavior and automatically inspects intermediate values to provide detailed failure reports.
  • CLI Test Runners - Automatically identifies and executes test files and functions based on naming conventions within the project directory structure.
  • Assertion Decomposition - Inspects failing expressions automatically to provide descriptive error messages without requiring specialized assertion methods.
  • Exception Verification - Ensures that specific code blocks raise the correct error types and provides access to exception details for inspection.
  • Plugin Architectures - Provides a modular system that allows third-party extensions to customize test collection, execution, and reporting through hooks.
  • Lifecycle Hooks - Allows plugins to intercept and modify the test lifecycle, including directory collection, option parsing, and reporting.
  • Hook-Based Plugin Systems - Features a hook-based plugin architecture that allows deep customization of the test lifecycle through event-driven registration.
  • Test Configuration - Centralizes project-wide testing settings and environment preferences within a dedicated configuration file.
  • Assertion Rewriting - Provides detailed failure reports by automatically inspecting expressions in standard language assertions.
  • Test Lifecycle and Execution Control - Controls the scope and cleanup of test resources across functions, classes, modules, or entire sessions to ensure reliable execution.
  • Test Case Generators - Implements dynamic test generation logic to determine test parameters or scopes based on runtime conditions or command-line options.
  • Outils de qualité de code - Framework for writing and running Python tests.
  • Outils de développement - Scalable testing framework.
  • Python Packages - General testing framework.
  • Python Projects - Listed in the “Python Projects” section of the Awesome For Beginners awesome list.
  • Testing Ecosystems - A mature framework for writing scalable tests in Python.
  • Frameworks de test - Scales Python testing from small to complex.
  • Testing Tools - Listed in the “Testing Tools” section of the Awesome Python awesome list.
  • Recursive Discovery Engines - Automatically traverses directory structures to identify and collect test modules based on naming conventions.
  • Framework Extensions - Implements hooks to customize command-line arguments, configuration parsing, and the overall test collection and execution lifecycle.
  • Assertion Rewriters - Modifies source code during import to inject detailed diagnostic information into standard language assertions for improved failure reporting.
  • Conditional Skipping - Prevents execution of specific tests, classes, or modules based on runtime conditions, environment settings, or missing dependencies.
  • Parametrized Fixtures - Configures fixture functions to run multiple times with different parameters, allowing tests to consume varied setup states.
  • Test Suite Filters - Restricts test discovery by excluding specific modules, classes, or functions based on file patterns, markers, or explicit deselection criteria.
  • State Persistence - Saves and retrieves execution metadata and test results on disk to enable selective re-running of failed tests across sessions.
  • Temporary Directory Managers - Automates the creation and cleanup of temporary directories for tests, with configurable retention policies for debugging.
  • Plugin Integrations - Integrates third-party plugins automatically upon installation to add specialized functionality like coverage reporting or distributed execution.
  • Plugin Distributions - Registers plugins through package metadata so they are automatically discovered and loaded by the testing environment.
  • Test State Persistence - Stores execution metadata and test results on disk to enable selective re-running of failed tests across sessions.
  • Warning Verification Utilities - Verifies that specific code blocks trigger expected warnings, matching messages against literal strings or regular expressions.
  • Test Annotations - Attaches custom or built-in attributes to test functions, classes, or modules to organize them for selective execution.
  • Expected Failure Markers - Identifies tests known to fail so they are reported separately from regressions while allowing them to run.
  • Legacy Framework Adapters - Executes existing test suites written for other frameworks natively without requiring code modifications or refactoring.
  • Project Root Definitions - Establishes a stable base directory for test discovery and plugin state storage to ensure consistent identification of test nodes.
  • Test Logging Utilities - Automatically captures log messages during test execution and displays them in the console output when a test fails.
  • Plugin Lifecycle Management - Controls the activation and deactivation of plugins through command-line flags, environment variables, or configuration files.
  • Marker Registrations - Declares metadata tags for tests to ensure they are recognized by the system and appear in documentation.
  • TOML Configuration Support - Supports project configuration using native TOML files for structured and readable settings.
  • Runtime State Modifiers - Overrides attributes, environment variables, or system paths during test execution and automatically restores the original state afterward.
  • Test Patching Utilities - Modifies attributes, dictionary items, or environment variables temporarily during a test and automatically restores them afterward.
  • Local Plugin Implementations - Defines directory-specific hook implementations in configuration files to customize test execution behavior for specific subdirectories.
  • Warning Issuance Systems - Confirms that specific code paths trigger expected warnings to ensure proper handling of deprecated or problematic features.
  • Dependency Warning Filters - Configures global or test-specific rules to ignore, display, or promote specific warnings to errors.
  • Doctest Runners - Runs code examples embedded in documentation files or source code docstrings as part of the automated test suite.
  • Test Isolation - Provides utilities to create temporary directories and execute tests in isolation for plugin development.
  • Subtest Reporters - Supports running multiple assertions within a single test function and reporting each failure independently.
  • Test Grouping Utilities - Groups related test functions into classes to improve structure and enable shared configuration or resource management.
  • Transient Failure Reruns - Re-executes tests that fail during a run to mitigate the impact of transient issues and improve build reliability.

Historique des stars

Graphique de l'historique des stars pour pytest-dev/pytestGraphique de l'historique des stars pour pytest-dev/pytest

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Pytest

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Pytest.
  • thomhurst/tunitAvatar de thomhurst

    thomhurst/TUnit

    3,744Voir sur GitHub↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    Voir sur GitHub↗3,744
  • mochajs/mochaAvatar de mochajs

    mochajs/mocha

    22,967Voir sur GitHub↗

    Mocha is a JavaScript test runner and framework designed to execute automated test suites across multiple runtimes, including Node.js and web browser environments. It functions as a pluggable testing tool for organizing and validating unit, integration, and functional tests. The project distinguishes itself through a plugin-based extension interface that allows for custom functionality and reporting. It supports a multi-runtime approach, enabling the same test suite to run in different JavaScript environments, and includes a watch mode that monitors the filesystem to trigger automatic test re

    JavaScriptbddbrowserjavascript
    Voir sur GitHub↗22,967
  • vitest-dev/vitestAvatar de vitest-dev

    vitest-dev/vitest

    15,970Voir sur GitHub↗

    Vitest is a high-performance testing framework designed for JavaScript and TypeScript applications. It provides an integrated environment that supports unit, integration, and browser-based testing, allowing developers to execute test suites natively without requiring separate build steps or complex configuration. The project distinguishes itself through a highly optimized execution model that leverages worker-thread isolation and on-demand module transformation to provide rapid feedback. It includes a comprehensive suite of mocking and spying utilities that allow for the interception of depen

    TypeScripttesttesting-toolsvite
    Voir sur GitHub↗15,970
  • microsoft/playwrightAvatar de microsoft

    microsoft/playwright

    91,074Voir sur GitHub↗

    Playwright is a comprehensive browser automation framework designed for end-to-end testing and web workflow automation. It provides a unified API to drive web applications across multiple browser engines, enabling developers to simulate complex user interactions, perform web scraping, and validate application behavior in consistent, isolated environments. The framework distinguishes itself through a web-first testing paradigm that prioritizes stability and resilience. By utilizing an auto-waiting actionability engine and accessibility-tree-based locators, it eliminates common sources of test

    TypeScriptautomationchromechromium
    Voir sur GitHub↗91,074
Voir les 30 alternatives à Pytest→

Questions fréquentes

Que fait pytest-dev/pytest ?

pytest est un framework de test pour Python qui fournit un exécuteur en ligne de commande pour découvrir et exécuter des suites de tests. Il est construit sur une architecture modulaire qui utilise les assertions standard du langage pour vérifier l'exactitude du code, inspectant automatiquement les expressions pour fournir des rapports d'échec détaillés sans nécessiter de méthodes d'assertion spécialisées.

Quelles sont les fonctionnalités principales de pytest-dev/pytest ?

Les fonctionnalités principales de pytest-dev/pytest sont : Test Frameworks, Dependency Injection, Data-Driven Parametrization, Test Execution Runners, Test Fixture Systems, Fixture Definitions, Execution Assertions, CLI Test Runners.

Quelles sont les alternatives open-source à pytest-dev/pytest ?

Les alternatives open-source à pytest-dev/pytest incluent : thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… mochajs/mocha — Mocha is a JavaScript test runner and framework designed to execute automated test suites across multiple runtimes,… vitest-dev/vitest — Vitest is a high-performance testing framework designed for JavaScript and TypeScript applications. It provides an… microsoft/playwright — Playwright is a comprehensive browser automation framework designed for end-to-end testing and web workflow… mobile-dev-inc/maestro — Maestro is a declarative mobile and web UI automation framework designed for end-to-end testing. It operates by… onsi/ginkgo — Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a…