Beispiel #1
0
 def test_split_after_one_column(self):
     g = grid(3, 3)
     g1, g2 = split_horizontally(g, 1)
     self.assertEqual(g1['rows'], [[cell()], [cell()], [cell()]])
     self.assertEqual(
         g2['rows'],
         [[cell(), cell()], [cell(), cell()], [cell(), cell()]])
Beispiel #2
0
 def test_rows_split_in_the_bottom(self):
     g = grid(2, 2)
     g1, g2 = split_vertically(g, 2)
     self.assertEqual(g1['rows'], [[cell(), cell()], [cell(), cell()]])
     self.assertEqual(g2['rows'], [])
Beispiel #3
0
 def test_rows_split_on_top(self):
     g = grid(2, 2)
     g1, g2 = split_vertically(g, 0)
     self.assertEqual(g1['rows'], [])
     self.assertEqual(g2['rows'], [[cell(), cell()], [cell(), cell()]])