We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71caad2 commit 5d9a394Copy full SHA for 5d9a394
1 file changed
Lib/test/test_unittest/testmock/testmock.py
@@ -1743,6 +1743,17 @@ def static_method(): pass
1743
mock_method.assert_called_once_with()
1744
self.assertRaises(TypeError, mock_method, 'extra_arg')
1745
1746
+ #Issue145754
1747
+ def test_create_autospec_type_hints_typechecking(self):
1748
+ from typing import TYPE_CHECKING
1749
+ if TYPE_CHECKING:
1750
+ from typing import Tuple
1751
+
1752
+ def foo(x: Tuple[int, ...]) -> None:
1753
+ pass
1754
1755
+ mock.create_autospec(foo)
1756
1757
#Issue21238
1758
def test_mock_unsafe(self):
1759
m = Mock()
0 commit comments