示例#1
0
 def testNegativeWidth(self):
     self.assertEqual(None, rasterise([1, 2, 3], -1))
示例#2
0
 def testInvalidWidth(self):
     self.assertEqual(None, rasterise([1, 2, 3], 0))
示例#3
0
 def testMultipleWidth(self):
     self.assertEqual([[1, 2], [3, 4], [5, 6], [7, 8]],
                      rasterise([1, 2, 3, 4, 5, 6, 7, 8], 2))
     self.assertEqual([[1, 2, 3, 4], [5, 6, 7, 8]],
                      rasterise([1, 2, 3, 4, 5, 6, 7, 8], 4))
示例#4
0
 def testWidthOne(self):
     self.assertEqual([[1], [2], [3]], rasterise([1, 2, 3], 1))
示例#5
0
 def testSameWidth(self):
     self.assertEqual([[1, 2, 3]], rasterise([1, 2, 3], 3))
示例#6
0
 def testNotMultipleWidth(self):
     self.assertEqual(None, rasterise([1, 2, 3], 2))