Beispiel #1
0
 def testNegativeWidth(self):
     self.assertEqual(None, rasterise([1, 2, 3], -1))
Beispiel #2
0
 def testInvalidWidth(self):
     self.assertEqual(None, rasterise([1, 2, 3], 0))
Beispiel #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))
Beispiel #4
0
 def testWidthOne(self):
     self.assertEqual([[1], [2], [3]], rasterise([1, 2, 3], 1))
Beispiel #5
0
 def testSameWidth(self):
     self.assertEqual([[1, 2, 3]], rasterise([1, 2, 3], 3))
Beispiel #6
0
 def testNotMultipleWidth(self):
     self.assertEqual(None, rasterise([1, 2, 3], 2))