/
githubmirror
/
scikit-learn
Обзор
Документация
Войти
/
githubmirror
/
scikit-learn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
sklearn/externals/array_api_extra/_lib/_testing.py
37 строк
1 KB
Lucas Colley
MNT: bump to array API 2025.12, array-api-compat 1.15, array-api-extra 0.10.3 (#34231)
11 июн 2026, 17:53
Не верифицирован
11 июн 2026, 17:53
2b91769
Код
Авторство
О чём код?
""" Private testing utilities. See also ..testing for public testing utilities. """ from __future__ import annotations import pytest def xfail( request: pytest.FixtureRequest, *, reason: str, strict: bool | None = None ) -> None: """ XFAIL the currently running test. Unlike ``pytest.xfail``, allow rest of test to execute instead of immediately halting it, so that it may result in a XPASS. xref https://github.com/pandas-dev/pandas/issues/38902 Parameters ---------- request : pytest.FixtureRequest ``request`` argument of the test function. reason : str Reason for the expected failure. strict : bool, optional If True, the test will be marked as failed if it passes. If False, the test will be marked as passed if it fails. Default: ``xfail_strict`` value in ``pyproject.toml``, or False if absent. """ if strict is not None: marker = pytest.mark.xfail(reason=reason, strict=strict) else: marker = pytest.mark.xfail(reason=reason) request.node.add_marker(marker)