mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
[3.10] bpo-46611: add coverage to instance and class checks in typing.py
(GH-31078) (GH-31182)
(cherry picked from commit 067c03bf40
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
3ceff9968b
commit
c1ff4cb98b
2 changed files with 59 additions and 16 deletions
|
@ -431,6 +431,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):
|
||||
|
@ -458,6 +460,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