The previous typing had an object passed to the user, which they can't do anything with without asserting, which is inconvenient. Change it to Any instead. Note that what comes *back* to pytest (the return value) should be an `object`, because we want to handle arbitrary objects without assuming anything about them.
25 lines
558 B
Python
25 lines
558 B
Python
"""File for checking typing issues.
|
|
|
|
This file is not executed, it is only checked by mypy to ensure that
|
|
none of the code triggers any mypy errors.
|
|
"""
|
|
import pytest
|
|
|
|
|
|
# Issue #7488.
|
|
@pytest.mark.xfail(raises=RuntimeError)
|
|
def check_mark_xfail_raises() -> None:
|
|
pass
|
|
|
|
|
|
# Issue #7494.
|
|
@pytest.fixture(params=[(0, 0), (1, 1)], ids=lambda x: str(x[0]))
|
|
def check_fixture_ids_callable() -> None:
|
|
pass
|
|
|
|
|
|
# Issue #7494.
|
|
@pytest.mark.parametrize("func", [str, int], ids=lambda x: str(x.__name__))
|
|
def check_parametrize_ids_callable(func) -> None:
|
|
pass
|