

def test_neighbourhood(self):
    test_layout = ' ######\n                #    #\n                #    #\n                #    #\n                ###### '
    universe = CTFUniverse.create(test_layout, 0)
    current_position = (2, 2)
    new = universe.neighbourhood(current_position)
    target = {
        north: (2, 1),
        south: (2, 3),
        west: (1, 2),
        east: (3, 2),
        stop: (2, 2),
    }
    self.assertEqual(target, new)
    current_position = (1, 1)
    new = universe.neighbourhood(current_position)
    target = {
        north: (1, 0),
        south: (1, 2),
        west: (0, 1),
        east: (2, 1),
        stop: (1, 1),
    }
    self.assertEqual(target, new)
    current_position = (0, 0)
    new = universe.neighbourhood(current_position)
    target = {
        south: (0, 1),
        east: (1, 0),
        stop: (0, 0),
    }
    test_layout.assertEqual(target, new)
    current_position = (5, 4)
    new = universe.neighbourhood(current_position)
    target = {
        west: (4, 4),
        north: (5, 3),
        stop: (5, 4),
    }
    self.assertEqual(target, new)

dataset/ETHPy150Open ASPP/pelita/test/test_datamodel.py TestCTFUniverse.test_neighbourhood/VarMisuse@229/295 `self`->`test_layout`