You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fbfabee
Browse filesBrowse the repository at this point in the historyBrowse files
mock_foo.assert_called_once_with("bad", y="ok") # BUG: This should report that x requires int, not str.
296
-
mock_foo.assert_any_call(1, y=2) # BUG: This should report that y requires str, not int.
294
+
mock_foo.assert_called_once_with("bad", y="ok") # E: Argument `Literal['bad']` is not assignable to parameter `x` with type `int` in function `other.foo`
295
+
mock_foo.assert_any_call(1, y=2) # E: Argument `Literal[2]` is not assignable to parameter `y` with type `str` in function `other.foo`
297
296
"#,
298
297
);
299
298
@@ -311,36 +310,33 @@ with patch("typing.assert_type") as mock_assert_type:
bug = "Mock assertions do not check the target signature",
344
340
test_patch_bound_method_checks_bound_signature,
345
341
TestEnv::one(
346
342
"other",
@@ -350,7 +346,7 @@ testcase!(
350
346
from unittest.mock import patch
351
347
352
348
with patch("other.instance.method") as mock_method:
353
-
mock_method.assert_called_once_with("bad") # BUG: This should report that x requires int, not str.
349
+
mock_method.assert_called_once_with("bad") # E: Argument `Literal['bad']` is not assignable to parameter `x` with type `int` in function `other.C.method`
0 commit comments