Lines Matching full:items
41 self.items = [SomeClass(c) for c in ('a', 'b', 'c')]
50 self.s = WeakSet(self.items)
51 self.d = dict.fromkeys(self.items)
85 self.assertEqual(self.s, WeakSet(self.items))
89 x = WeakSet(self.items + self.items2)
93 self.assertEqual(len(u), len(self.items) + len(self.items2))
96 self.assertEqual(len(u), len(self.items) + len(self.items2))
112 self.assertEqual(i.intersection(C(self.items)), x)
131 self.assertEqual(self.s, WeakSet(self.items))
144 self.assertEqual(self.s, WeakSet(self.items))
147 self.assertEqual(len(i), len(self.items) + len(self.items2))
150 self.assertEqual(len(i), len(self.items) + len(self.items2))
203 s.__init__(self.items)
211 s = WeakSet(self.items)
264 for c in (self.items + self.items2):
270 for c in (self.items + self.items2):
275 for c in (self.items + self.items2):
281 for c in (self.items + self.items2):
282 if c in self.items2 and c in self.items:
290 for c in (self.items + self.items2):
291 if c in self.items2 and c in self.items:
299 for c in (self.items + self.items2):
300 if c in self.items and c not in self.items2:
309 for c in (self.items + self.items2):
310 if c in self.items and c not in self.items2:
318 for c in (self.items + self.items2):
319 if (c in self.items) ^ (c in self.items2):
327 for c in (self.items + self.items2):
328 if (c in self.items) ^ (c in self.items2):
348 self.assertTrue(self.s == WeakSet(self.items))
349 self.assertFalse(self.s == set(self.items))
350 self.assertFalse(self.s == list(self.items))
351 self.assertFalse(self.s == tuple(self.items))
355 self.assertTrue(self.s != set(self.items))
362 # Create new items to be sure no-one else holds a reference
363 items = [SomeClass(c) for c in ('a', 'b', 'c')]
364 s = WeakSet(items)
368 del items[-1]
370 # We have removed either the first consumed items, or another one
371 self.assertIn(len(list(it)), [len(items), len(items) - 1])
374 self.assertEqual(len(s), len(items))
378 items = [SomeClass(c) for c in string.ascii_letters]
379 s = WeakSet(items)
386 u = SomeClass(str(items.pop()))
410 items = [RefCycle() for i in range(N)]
411 s = WeakSet(items)
412 del items
434 items = [RefCycle() for i in range(N)]
435 s = WeakSet(items)
436 del items
437 # All items will be collected at next garbage collection pass