From 38c9d59ddc34363f70d2b7cd3b2e93e58a16d7fa Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 24 Apr 2020 21:50:20 +0300 Subject: [PATCH] pre-commit: update blacken-docs 1.0.0 -> 1.6.0 --- .pre-commit-config.yaml | 2 +- src/_pytest/mark/__init__.py | 8 ++++---- src/_pytest/monkeypatch.py | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) 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)