예제 #1
0
 def test_expand_columnfixed(self):
     """ grow vertically infinitely """
     g = Grid(columns=2)
     assert g.get(0, 0) is Grid.EMPTY
     assert g.get(0, 1) is Grid.EMPTY
     assert g.get(5, 1) is Grid.EMPTY
     assert g.get(3, 0) is Grid.EMPTY
예제 #2
0
 def test_expand_fixed(self):
     """ a fresh grid should size itself appropriately """
     g = Grid(rows=2, columns=2)
     assert g.get(0, 0) is Grid.EMPTY
     assert g.get(1, 0) is Grid.EMPTY
     assert g.get(0, 1) is Grid.EMPTY
     assert g.get(1, 1) is Grid.EMPTY
예제 #3
0
 def test_expand_rowfixed(self):
     """ grow horizontally infinitely """
     g = Grid(rows=2)
     assert g.get(0, 0) is Grid.EMPTY
     assert g.get(0, 1) is Grid.EMPTY
     assert g.get(0, 6) is Grid.EMPTY
     assert g.get(1, 0) is Grid.EMPTY
     assert g.get(1, 12) is Grid.EMPTY