Skip to content

Commit 64a6cad

Browse files
Fix doctest for get_protocol_members (#680)
1 parent 9215c95 commit 64a6cad

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/test_typing_extensions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9574,6 +9574,10 @@ def test_sentinel_not_picklable(self):
95749574
):
95759575
pickle.dumps(sentinel)
95769576

9577+
def load_tests(loader, tests, pattern):
9578+
import doctest
9579+
tests.addTests(doctest.DocTestSuite(typing_extensions))
9580+
return tests
95779581

95789582
if __name__ == '__main__': # pragma: no cover
95799583
main()

src/typing_extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,8 +3864,8 @@ def get_protocol_members(tp: type, /) -> typing.FrozenSet[str]:
38643864
>>> class P(Protocol):
38653865
... def a(self) -> str: ...
38663866
... b: int
3867-
>>> get_protocol_members(P)
3868-
frozenset({'a', 'b'})
3867+
>>> get_protocol_members(P) == frozenset({'a', 'b'})
3868+
True
38693869
38703870
Raise a TypeError for arguments that are not Protocols.
38713871
"""

0 commit comments

Comments
 (0)