$npx skillfedfor your agent

pytest-runtime-xfail

Call runtime_xfail() to mark running test as xfail.

With conditionsPyPI UtilitiesReleased Oct 2025179.9K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_runtime_xfail-1.1.1-py3-none-any.whl
v1.1.1 · released 2025-10-10 · Python >=3.8 · 1 runtime deps: pytest

Yes, if you need runtime-conditional xfail marking in pytest. The plugin solves a real gap in pytest's built-in xfail mechanisms and has no security vulnerabilities. Install friction is minimal. The aging maintenance status (308 days since last release) is a minor concern for a stable, single-purpose fixture, but the repository is not archived and the package is marked Production/Stable.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction; single pytest dependency.
  • Maintenance status is aging—last release 308 days ago—but the repository remains active and the package is marked Production/Stable.

License · maintenance · safety

permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required.

last release 2025-10-10 (308 days) · last repo commit 2025-10-10 · 5 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 179,931 downloads/mo, #10,159 on PyPI

Verify before relying

pip install pytest-runtime-xfail

import pytest

def test_something(runtime_xfail):
    if runtime_condition:
        runtime_xfail(reason="explanation")
    assert True  # test continues to run
  • Whether the plugin works correctly with pytest parametrization and xfail_strict in all supported Python versions.
  • Performance impact when runtime_xfail is called in fixtures used by many tests.
Same gist for agents: .md · .json

What it is and what it does

pytest-runtime-xfail fills a gap in pytest's xfail handling by allowing you to decide at runtime whether a test should be marked as expected-to-fail, while still running the test to completion. The standard pytest.xfail() call stops test execution immediately; @pytest.mark.xfail() requires the decision at collection time. This plugin's runtime_xfail fixture lets you make that decision based on conditions known only during test execution, and the test continues running so you can see both XFAIL (test failed as expected) and XPASS (test passed unexpectedly) outcomes.

The fixture works by adding an xfail marker to the test node dynamically, similar to calling request.node.add_marker(pytest.mark.xfail()) but packaged as a reusable fixture. It respects the xfail_strict configuration option, so passing tests marked with runtime_xfail will fail the test run if strict mode is enabled—useful for detecting when previously-failing tests start passing.

Use it for

  • Mark tests as xfail when a runtime condition (e.g., OS, Python version, or environment variable) indicates expected failure.
  • Conditionally expect failure in a shared fixture that multiple tests depend on, based on setup-time detection.
  • Track when platform-specific or version-specific test failures are resolved by using xfail_strict to catch XPASS.
  • Avoid skipping tests while still recording them as expected failures when a runtime dependency or feature is unavailable.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need runtime-conditional xfail marking in pytest.

The plugin solves a real gap in pytest's built-in xfail mechanisms and has no security vulnerabilities. Install friction is minimal. The aging maintenance status (308 days since last release) is a minor concern for a stable, single-purpose fixture, but the repository is not archived and the package is marked Production/Stable.

Install

pytest-runtime-xfail on PyPI

Before you install

Low install friction; single pytest dependency. Maintenance status is aging—last release 308 days ago—but the repository remains active and the package is marked Production/Stable.

License in practice

MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required.

Quickstart

pip install pytest-runtime-xfail

import pytest

def test_something(runtime_xfail):
    if runtime_condition:
        runtime_xfail(reason="explanation")
    assert True  # test continues to run

Verify before relying

  • Whether the plugin works correctly with pytest parametrization and xfail_strict in all supported Python versions.
  • Performance impact when runtime_xfail is called in fixtures used by many tests.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceAging 308 days since the last release
Last repo commit
First released
Downloads179,931 / month, #10,159 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: TestingTopic :: Utilities

Evidence: pytest_runtime_xfail-1.1.1-py3-none-any.whl

Tags

Capabilities
pytest xfail runtime decisionconditional test failure markingpytest dynamic xfailruntime expected failurepytest fixture xfailconditional xfail pytest
Topics
pytest-plugintest-marking

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytest xfail runtime decision”

  • pytest-runtime-xfailA pytest plugin that provides a `runtime_xfail` fixture to mark tests…
  • pytest-jiraA pytest plugin that links test cases to JIRA tickets, allowing tests…
  • pytest-codeblocksA pytest plugin that automatically discovers and runs Python and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also pytest-check · pytest-jira-xray · pytest-jira · pytest-rerunfailures · pylint-pytest · pytest-retry · pytest-race · pytest-base-url · pytest-subtests · pytest-tap