Lines Matching full:items

22         self.items = [ustr(c) for c in ('a', 'b', 'c')]
31 self.s = WeakSet(self.items)
32 self.d = dict.fromkeys(self.items)
66 self.assertEqual(self.s, WeakSet(self.items))
70 x = WeakSet(self.items + self.items2)
74 self.assertEqual(len(u), len(self.items) + len(self.items2))
77 self.assertEqual(len(u), len(self.items) + len(self.items2))
93 self.assertEqual(i.intersection(C(self.items)), x)
112 self.assertEqual(self.s, WeakSet(self.items))
125 self.assertEqual(self.s, WeakSet(self.items))
128 self.assertEqual(len(i), len(self.items) + len(self.items2))
131 self.assertEqual(len(i), len(self.items) + len(self.items2))
184 s.__init__(self.items)
192 s = WeakSet(self.items)
245 for c in (self.items + self.items2):
251 for c in (self.items + self.items2):
256 for c in (self.items + self.items2):
262 for c in (self.items + self.items2):
263 if c in self.items2 and c in self.items:
271 for c in (self.items + self.items2):
272 if c in self.items2 and c in self.items:
280 for c in (self.items + self.items2):
281 if c in self.items and c not in self.items2:
290 for c in (self.items + self.items2):
291 if c in self.items and c not in self.items2:
299 for c in (self.items + self.items2):
300 if (c in self.items) ^ (c in self.items2):
308 for c in (self.items + self.items2):
309 if (c in self.items) ^ (c in self.items2):
329 self.assertTrue(self.s == WeakSet(self.items))
330 self.assertFalse(self.s == set(self.items))
331 self.assertFalse(self.s == list(self.items))
332 self.assertFalse(self.s == tuple(self.items))
337 self.assertTrue(self.s != set(self.items))
344 # Create new items to be sure no-one else holds a reference
345 items = [ustr(c) for c in ('a', 'b', 'c')]
346 s = WeakSet(items)
350 del items[-1]
352 # We have removed either the first consumed items, or another one
353 self.assertIn(len(list(it)), [len(items), len(items) - 1])
356 self.assertEqual(len(s), len(items))
360 items = [ustr(c) for c in string.ascii_letters]
361 s = WeakSet(items)
369 u = ustr(str(items.pop()))
397 items = [RefCycle() for i in range(N)]
398 s = WeakSet(items)
399 del items
421 items = [RefCycle() for i in range(N)]
422 s = WeakSet(items)
423 del items
424 # All items will be collected at next garbage collection pass