[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
fc92f5ef3e
commit
aecdc3917b
|
@ -264,11 +264,14 @@ This prevents a common mistake among beginners that expect that returning a `boo
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@pytest.mark.parametrize(['a', 'b', 'result'], [
|
@pytest.mark.parametrize(
|
||||||
[1, 2, 5],
|
["a", "b", "result"],
|
||||||
[2, 3, 8],
|
[
|
||||||
[5, 3, 18],
|
[1, 2, 5],
|
||||||
])
|
[2, 3, 8],
|
||||||
|
[5, 3, 18],
|
||||||
|
],
|
||||||
|
)
|
||||||
def test_foo(a, b, result):
|
def test_foo(a, b, result):
|
||||||
return foo(a, b) == result
|
return foo(a, b) == result
|
||||||
|
|
||||||
|
@ -278,11 +281,14 @@ The proper fix is to change the `return` to an `assert`:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@pytest.mark.parametrize(['a', 'b', 'result'], [
|
@pytest.mark.parametrize(
|
||||||
[1, 2, 5],
|
["a", "b", "result"],
|
||||||
[2, 3, 8],
|
[
|
||||||
[5, 3, 18],
|
[1, 2, 5],
|
||||||
])
|
[2, 3, 8],
|
||||||
|
[5, 3, 18],
|
||||||
|
],
|
||||||
|
)
|
||||||
def test_foo(a, b, result):
|
def test_foo(a, b, result):
|
||||||
assert foo(a, b) == result
|
assert foo(a, b) == result
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue