import unittest
from app import chunked
class T(unittest.TestCase):
 def test_all(self):
  self.assertEqual(list(chunked((x for x in range(7)),3)),[[0,1,2],[3,4,5],[6]])
  self.assertEqual(list(chunked([],2)),[])
  with self.assertRaises(ValueError): list(chunked([1],0))
if __name__=='__main__': unittest.main()
