Example #1
0
 def function(self, *args, **kw):
     return united(paired(*args, **kw))
Example #2
0
 def test_other(self):
     self.assert_iter_equal(united(paired([0, 1])), [0, 1])
     self.assert_iter_equal(united(paired(range(3))), list(range(3)))
     self.assert_iter_equal(united(paired(range(12))), list(range(12)))
Example #3
0
 def function(self, *args, **kw):
     return paired(*args, **kw)
Example #4
0
 def test_other(self):
     self.assert_iter_equal(paired(range(3)), [(0, 1), (1, 2)])
     self.assert_iter_equal(paired(range(4)), [(0, 1), (1, 2), (2, 3)])
     self.assert_iter_equal(paired(range(5)), [(0, 1), (1, 2), (2, 3),
                                               (3, 4)])
Example #5
0
 def test_empty(self):
     for value in [-1, None, 0, 1]:
         self.assert_iter_equal(chopped(paired(range(0)), value), [])
Example #6
0
 def test_values(self):
     for value in [-1, 1, 10]:
         for input_ in [-1, None, 0]:
             self.assert_iter_equal(chopped(paired(range(value)), input_),
                                    [])
Example #7
0
 def test_values(self):
     for value in [-1, 1, 10]:
         for input_ in [-1, None, 0]:
             self.assert_iter_equal(chopped(paired(range(value)), input_), [])
Example #8
0
 def _transition_pairs(self, strings):
     for string in strings:
         yield from iterlib.paired(string)
Example #9
0
 def test_empty(self):
     for value in [-1, None, 0, 1]:
         self.assert_iter_equal(chopped(paired(range(0)), value), [])
Example #10
0
 def test_other(self):
     self.assert_iter_equal(united(paired([0, 1])),    [0, 1])
     self.assert_iter_equal(united(paired(range(3))),  list(range(3)))
     self.assert_iter_equal(united(paired(range(12))), list(range(12)))
Example #11
0
 def function(self, *args, **kw):
     return united(paired(*args, **kw))
Example #12
0
 def test_other(self):
     self.assert_iter_equal(paired(range(3)), [(0, 1), (1, 2)])
     self.assert_iter_equal(paired(range(4)), [(0, 1), (1, 2), (2, 3)])
     self.assert_iter_equal(paired(range(5)), [(0, 1), (1, 2), (2, 3), (3, 4)])
Example #13
0
 def function(self, *args, **kw):
     return paired(*args, **kw)