mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-46611: add coverage to instance and class checks in typing.py
(GH-31078)
This commit is contained in:
parent
b556f53785
commit
067c03bf40
2 changed files with 59 additions and 16 deletions
|
@ -439,6 +439,8 @@ class TupleTests(BaseTestCase):
|
|||
class MyTuple(tuple):
|
||||
pass
|
||||
self.assertIsSubclass(MyTuple, Tuple)
|
||||
self.assertIsSubclass(Tuple, Tuple)
|
||||
self.assertIsSubclass(tuple, Tuple)
|
||||
|
||||
def test_tuple_instance_type_error(self):
|
||||
with self.assertRaises(TypeError):
|
||||
|
@ -466,6 +468,7 @@ class BaseCallableTests:
|
|||
with self.assertRaises(TypeError):
|
||||
issubclass(types.FunctionType, Callable[[int], int])
|
||||
self.assertIsSubclass(types.FunctionType, Callable)
|
||||
self.assertIsSubclass(Callable, Callable)
|
||||
|
||||
def test_eq_hash(self):
|
||||
Callable = self.Callable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue