def test_shift_vertical(self): r = Room(self.cells) r.shift_vertical(100) for cell in r.cells: assert cell.coordinates[0] >= 100, cell.coordinates for i in range(4): for j in range(5): assert (i + 100, j) in r.cell_coordinates
def test_no_overlap(self): r1 = Room(self.cells) cs2 = deepcopy(self.cells) r2 = Room(cs2) r2.shift_vertical(100) assert not r1.overlaps(r2)
def test_shift_vertical_one_row(self): r = Room(self.cells) r.shift_vertical(1) for i in range(4): for j in range(5): assert (i + 1, j) in r.cell_coordinates