def test_for_resumable(self):
    'Test filter_unique is resumable after a for loop.'
    gen2 = tools.filter_unique(self.ints)
    deduped = []
    for item in gen2:
        deduped.append(item)
        if (len(deduped) == 3):
            break
    self.assertEqual(deduped, [1, 3, 2])
    last = next(gen2)
    self.assertEqual(last, 4)
    self.assertRaises(StopIteration, next, gen2)
Test filter_unique is resumable after a for loop.
def test_for_resumable(self):
    
    gen2 = tools.filter_unique(self.ints)
    deduped = []
    for item in gen2:
        deduped.append(item)
        if (len(deduped) == 3):
            break
    self.assertEqual(deduped, [1, 3, 2])
    last = next(gen2)
    self.assertEqual(last, 4)
    self.assertRaises(StopIteration, next, gen2)