예제 #1
0
 def test_infinite(self):
     outgen = seq.prepend(100, count(101))
     outlist = list(islice(outgen, 0, 10))
     self.assertEquals(outlist, range(100, 110))
예제 #2
0
 def test_normal(self):
     outlist = seq.prepend(1, [2, 3, 4, 5])
     self.assertEquals(list(outlist), [1, 2, 3, 4, 5])
예제 #3
0
 def test_single(self):
     outlist = list(seq.prepend(self, []))
     self.assertEquals([self], outlist)
예제 #4
0
	def test_infinite(self):
		outgen = seq.prepend(100, count(101))
		outlist = list(islice(outgen, 0, 10))
		self.assertEquals(outlist, range(100, 110))
예제 #5
0
	def test_normal(self):
		outlist = seq.prepend(1, [2, 3, 4, 5])
		self.assertEquals(list(outlist), [1, 2, 3, 4, 5])
예제 #6
0
	def test_single(self):
		outlist = list(seq.prepend(self, []))
		self.assertEquals([self], outlist)