示例#1
0
 def testEnd(self):
     size = len(self.data)
     s = stream.substream(self.s, size - 4, size)
     self.assertEquals("tree", self.suckTheMarrow(s))
示例#2
0
 def testNotStart(self):
     s = stream.substream(self.s, 12, 26)
     self.assertEquals("with my friend", self.suckTheMarrow(s))
示例#3
0
 def testEmptySubstream(self):
     s = stream.substream(self.s, 11, 11)
     self.assertEquals("", self.suckTheMarrow(s))
示例#4
0
 def testStart(self):
     s = stream.substream(self.s, 0, 11)
     self.assertEquals("I was angry", self.suckTheMarrow(s))
示例#5
0
 def testEnd(self):
     size = len(self.data)
     s = stream.substream(self.s, size-4, size)
     self.assertEquals('tree', self.suckTheMarrow(s))
示例#6
0
 def testEmptySubstream(self):
     s = stream.substream(self.s, 11, 11)
     self.assertEquals('', self.suckTheMarrow(s))
示例#7
0
 def testNotStart(self):
     s = stream.substream(self.s, 12, 26)
     self.assertEquals('with my friend', self.suckTheMarrow(s))
示例#8
0
 def testStart(self):
     s = stream.substream(self.s, 0, 11)
     self.assertEquals('I was angry', self.suckTheMarrow(s))