def test_stop(self):
    'Test filter_unique with an ignoring container.'
    deduped = ContainsStopList()
    deduped.stop_list = [2]
    deduper = tools.filter_unique(self.ints, container=deduped)
    deduped_out = list(deduper)
    self.assertCountEqual(deduped, deduped_out)
    self.assertEqual(deduped, set([1, 3]))
    self.assertRaises(StopIteration, next, deduper)
    deduped = AddStopList()
    deduped.stop_list = [4]
    deduper = tools.filter_unique(self.ints, container=deduped)
    deduped_out = list(deduper)
    self.assertCountEqual(deduped, deduped_out)
    self.assertEqual(deduped, set([1, 2, 3]))
    self.assertRaises(StopIteration, next, deduper)
Test filter_unique with an ignoring container.
def test_stop(self):
    
    deduped = ContainsStopList()
    deduped.stop_list = [2]
    deduper = tools.filter_unique(self.ints, container=deduped)
    deduped_out = list(deduper)
    self.assertCountEqual(deduped, deduped_out)
    self.assertEqual(deduped, set([1, 3]))
    self.assertRaises(StopIteration, next, deduper)
    deduped = AddStopList()
    deduped.stop_list = [4]
    deduper = tools.filter_unique(self.ints, container=deduped)
    deduped_out = list(deduper)
    self.assertCountEqual(deduped, deduped_out)
    self.assertEqual(deduped, set([1, 2, 3]))
    self.assertRaises(StopIteration, next, deduper)