Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test
  • Loading branch information
mschoettle committed Mar 10, 2026
commit 5d9a3945d89b827e51f78a1a4a14418d0065dfa8
11 changes: 11 additions & 0 deletions Lib/test/test_unittest/testmock/testmock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,17 @@ def static_method(): pass
mock_method.assert_called_once_with()
self.assertRaises(TypeError, mock_method, 'extra_arg')

#Issue145754
Comment thread
mschoettle marked this conversation as resolved.
Outdated
def test_create_autospec_type_hints_typechecking(self):
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Tuple
Comment thread
mschoettle marked this conversation as resolved.
Outdated

def foo(x: Tuple[int, ...]) -> None:
pass

mock.create_autospec(foo)

#Issue21238
def test_mock_unsafe(self):
m = Mock()
Expand Down
Loading