diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c47b5576..796ba177b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: black args: [--safe, --quiet] - repo: https://github.com/asottile/blacken-docs - rev: v1.0.0 + rev: v1.6.0 hooks: - id: blacken-docs additional_dependencies: [black==19.10b0] diff --git a/src/_pytest/mark/__init__.py b/src/_pytest/mark/__init__.py index dab0cf149..36245c25a 100644 --- a/src/_pytest/mark/__init__.py +++ b/src/_pytest/mark/__init__.py @@ -27,10 +27,10 @@ def param(*values, **kw): .. code-block:: python - @pytest.mark.parametrize("test_input,expected", [ - ("3+5", 8), - pytest.param("6*9", 42, marks=pytest.mark.xfail), - ]) + @pytest.mark.parametrize( + "test_input,expected", + [("3+5", 8), pytest.param("6*9", 42, marks=pytest.mark.xfail),], + ) def test_eval(test_input, expected): assert eval(test_input) == expected diff --git a/src/_pytest/monkeypatch.py b/src/_pytest/monkeypatch.py index ce1c0f651..9d802a625 100644 --- a/src/_pytest/monkeypatch.py +++ b/src/_pytest/monkeypatch.py @@ -117,6 +117,8 @@ class MonkeyPatch: .. code-block:: python import functools + + def test_partial(monkeypatch): with monkeypatch.context() as m: m.setattr(functools, "partial", 3)