Thanks to visit codestin.com
Credit goes to github.com

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
Update Lib/test/test_typing.py
Co-authored-by: Ken Jin <[email protected]>
  • Loading branch information
uriyyo and Fidget-Spinner authored May 12, 2021
commit 9c66ec36f1556833c04005156763d96a757e8c1e
7 changes: 2 additions & 5 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,11 +1426,8 @@ def test_non_runtime_protocol_isinstance_check(self):
class P(Protocol):
x: int

class A:
pass

with self.assertRaises(TypeError):
isinstance(A(), P)
with self.assertRaisesRegex(TypeError, "@runtime_checkable"):
isinstance(1, P)


class GenericTests(BaseTestCase):
Expand Down