Merge branch 'main' into fine-grain-verbosity
This commit is contained in:
commit
b91a467040
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 23.10.1
|
rev: 23.11.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: [--safe, --quiet]
|
args: [--safe, --quiet]
|
||||||
|
@ -56,7 +56,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: python-use-type-annotations
|
- id: python-use-type-annotations
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v1.6.1
|
rev: v1.7.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
files: ^(src/|testing/)
|
files: ^(src/|testing/)
|
||||||
|
|
1
AUTHORS
1
AUTHORS
|
@ -340,6 +340,7 @@ Saiprasad Kale
|
||||||
Samuel Colvin
|
Samuel Colvin
|
||||||
Samuel Dion-Girardeau
|
Samuel Dion-Girardeau
|
||||||
Samuel Searles-Bryant
|
Samuel Searles-Bryant
|
||||||
|
Samuel Therrien (Avasam)
|
||||||
Samuele Pedroni
|
Samuele Pedroni
|
||||||
Sanket Duthade
|
Sanket Duthade
|
||||||
Sankt Petersbug
|
Sankt Petersbug
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Improved the documentation and type signature for :func:`pytest.mark.xfail <pytest.mark.xfail>`'s ``condition`` param to use ``False`` as the default value.
|
|
@ -239,12 +239,11 @@ pytest.mark.xfail
|
||||||
|
|
||||||
Marks a test function as *expected to fail*.
|
Marks a test function as *expected to fail*.
|
||||||
|
|
||||||
.. py:function:: pytest.mark.xfail(condition=None, *, reason=None, raises=None, run=True, strict=xfail_strict)
|
.. py:function:: pytest.mark.xfail(condition=False, *, reason=None, raises=None, run=True, strict=xfail_strict)
|
||||||
|
|
||||||
:type condition: bool or str
|
:keyword Union[bool, str] condition:
|
||||||
:param condition:
|
|
||||||
Condition for marking the test function as xfail (``True/False`` or a
|
Condition for marking the test function as xfail (``True/False`` or a
|
||||||
:ref:`condition string <string conditions>`). If a bool, you also have
|
:ref:`condition string <string conditions>`). If a ``bool``, you also have
|
||||||
to specify ``reason`` (see :ref:`condition string <string conditions>`).
|
to specify ``reason`` (see :ref:`condition string <string conditions>`).
|
||||||
:keyword str reason:
|
:keyword str reason:
|
||||||
Reason why the test function is marked as xfail.
|
Reason why the test function is marked as xfail.
|
||||||
|
|
|
@ -457,7 +457,7 @@ if TYPE_CHECKING:
|
||||||
@overload
|
@overload
|
||||||
def __call__(
|
def __call__(
|
||||||
self,
|
self,
|
||||||
condition: Union[str, bool] = ...,
|
condition: Union[str, bool] = False,
|
||||||
*conditions: Union[str, bool],
|
*conditions: Union[str, bool],
|
||||||
reason: str = ...,
|
reason: str = ...,
|
||||||
run: bool = ...,
|
run: bool = ...,
|
||||||
|
|
|
@ -8,3 +8,5 @@ import _pytest._py.path as path
|
||||||
|
|
||||||
sys.modules["py.error"] = error
|
sys.modules["py.error"] = error
|
||||||
sys.modules["py.path"] = path
|
sys.modules["py.path"] = path
|
||||||
|
|
||||||
|
__all__ = ["error", "path"]
|
||||||
|
|
|
@ -868,6 +868,9 @@ class TestLocalPath(CommonFSTests):
|
||||||
py_path.strpath, str_path
|
py_path.strpath, str_path
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@pytest.mark.xfail(
|
||||||
|
reason="#11603", raises=(error.EEXIST, error.ENOENT), strict=False
|
||||||
|
)
|
||||||
def test_make_numbered_dir_multiprocess_safe(self, tmpdir):
|
def test_make_numbered_dir_multiprocess_safe(self, tmpdir):
|
||||||
# https://github.com/pytest-dev/py/issues/30
|
# https://github.com/pytest-dev/py/issues/30
|
||||||
with multiprocessing.Pool() as pool:
|
with multiprocessing.Pool() as pool:
|
||||||
|
|
Loading…
Reference in New Issue