mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
[3.9] bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and typing (GH-23765)
Backport of GH-23060.
This commit is contained in:
parent
14f2a124e2
commit
33b3fedd43
7 changed files with 202 additions and 43 deletions
|
@ -450,14 +450,6 @@ class CallableTests(BaseTestCase):
|
|||
type(c)()
|
||||
|
||||
def test_callable_wrong_forms(self):
|
||||
with self.assertRaises(TypeError):
|
||||
Callable[[...], int]
|
||||
with self.assertRaises(TypeError):
|
||||
Callable[(), int]
|
||||
with self.assertRaises(TypeError):
|
||||
Callable[[()], int]
|
||||
with self.assertRaises(TypeError):
|
||||
Callable[[int, 1], 2]
|
||||
with self.assertRaises(TypeError):
|
||||
Callable[int]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue