Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(19)

Delta Between Two Patch Sets: Lib/test/test_contains.py

Issue 25958: Implicit ABCs have no means of "anti-registration"
Left Patch Set: Created 3 years, 6 months ago
Right Patch Set: Created 3 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_collections.py ('k') | Lib/test/test_enumerate.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 from collections import deque 1 from collections import deque
2 import unittest 2 import unittest
3 3
4 4
5 class base_set: 5 class base_set:
6 def __init__(self, el): 6 def __init__(self, el):
7 self.el = el 7 self.el = el
8 8
9 class myset(base_set): 9 class myset(base_set):
10 def __contains__(self, el): 10 def __contains__(self, el):
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 while False: 105 while False:
106 yield None 106 yield None
107 __contains__ = None 107 __contains__ = None
108 bc = BlockContains() 108 bc = BlockContains()
109 self.assertFalse(0 in c) 109 self.assertFalse(0 in c)
110 self.assertFalse(0 in list(bc)) 110 self.assertFalse(0 in list(bc))
111 self.assertRaises(TypeError, lambda: 0 in bc) 111 self.assertRaises(TypeError, lambda: 0 in bc)
112 112
113 if __name__ == '__main__': 113 if __name__ == '__main__':
114 unittest.main() 114 unittest.main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+