Esempio n. 1
0
 def test_grid_coords_span(self):
     grid = Grid(self.table)
     left, right, top, bottom = grid.cell_coords(0, 0, span=(2, 2))
     self.assertAlmostEqual(left, 0., places=4)
     self.assertAlmostEqual(right, 6., places=4)
     self.assertAlmostEqual(top, 0., places=4)
     self.assertAlmostEqual(bottom, -6., places=4)
Esempio n. 2
0
 def test_grid_coords(self):
     grid = Grid(self.table)
     left, right, top, bottom = grid.cell_coords(1, 1, span=(1, 1))
     self.assertAlmostEqual(left, 3., places=4)
     self.assertAlmostEqual(right, 6., places=4)
     self.assertAlmostEqual(top, -3., places=4)
     self.assertAlmostEqual(bottom, -6., places=4)