Example #1
0
 def test_16_too_many_vertical_folds(self):
     g = Grid(16)
     g.fold_bottom_to_top()
     g.fold_bottom_to_top()
     g.fold_top_to_bottom()
     g.fold_top_to_bottom()
     with self.assertRaisesRegex(GridError, "Too many vertical folds!"):
         g.fold_top_to_bottom()
Example #2
0
 def test_2_fold_bottom_to_top(self):
     g = Grid(2)
     g.fold_bottom_to_top()
     self.assertEqual(g.grid, [[[3, 4]], [[1, 2]]])