def test_list_and_set(self):
     c = collect(list(range(10))).diff_seq(set(range(0, 5)))
     self.assertEqual(c.iterable, set(range(10)) - set(set(range(0, 5))))
Example #2
0
 def test_list(self):
     c = collect(list(range(10)))
     self.assertEqual(c.tuple(), tuple(range(10)))
Example #3
0
 def test_enumerate(self):
     c = collect(list(range(10))).enumerate()
     self.assertEqual(c.tuple(), tuple(enumerate(range(10))))
Example #4
0
 def test_dict_items(self):
     c = collect({'a': 1, 'b': 2}.items())
     self.assertEqual(c.tuple(), tuple({'a': 1, 'b': 2}.items()))
Example #5
0
 def test_dict(self):
     c = collect({'a': 1, 'b': 2})
     self.assertEqual(c.tuple(), tuple({'a': 1, 'b': 2}))
Example #6
0
 def test_iterator(self):
     c = collect(iter(range(10)))
     self.assertEqual(c.tuple(), tuple(range(10)))