def test_instanciating_iterator_with_nonzero_threshold_raises(self): with self.assertRaises(ValueError): SavepointIterator(self.iterable, threshold=0) with self.assertRaises(ValueError): SavepointIterator(self.iterable, threshold=None)