Skip to content

Commit 6c89f41

Browse files
committed
add mypy test
1 parent 0930f9e commit 6c89f41

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

whole-repo-tests/test_mypy.py

+18
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import os
1212
import subprocess
13+
import textwrap
1314

1415
import pytest
1516

@@ -343,6 +344,23 @@ def test_stateful_consumed_bundle_cannot_be_target(tmpdir):
343344
assert_mypy_errors(str(f.realpath()), [(3, "call-overload")])
344345

345346

347+
def test_raises_for_mixed_pos_kwargs_in_given(tmpdir):
348+
f = tmpdir.join("raises_for_mixed_pos_kwargs_in_given")
349+
f.write(
350+
textwrap.dedent(
351+
"""
352+
from hypothesis import given
353+
from hypothesis.strategies import text
354+
355+
@given(text(), x=text()) # type: ignore
356+
def test_bar(x):
357+
...
358+
"""
359+
)
360+
)
361+
assert_mypy_errors(str(f.realpath()), [(5, "call-overload")])
362+
363+
346364
@pytest.mark.parametrize(
347365
"return_val,errors",
348366
[

0 commit comments

Comments
 (0)