def test_dropping(self): result = transduce(transducer=dropping(3), reducer=appending(), iterable=[2, 4, 5, 8, 10]) self.assertListEqual(result, [8, 10])
def test_dropping_validation(self): with self.assertRaises(ValueError): transduce(transducer=dropping(-3), reducer=appending(), iterable=[2, 4, 5, 8, 10])