def test_outerRing(self): iso = IsolatingHelper() self.assertTrue(iso.canAlwaysRemove("a1")) self.assertTrue(iso.canAlwaysRemove("a4")) self.assertTrue(iso.canAlwaysRemove("b5")) self.assertTrue(iso.canAlwaysRemove("d7")) self.assertTrue(iso.canAlwaysRemove("g2")) self.assertTrue(iso.canAlwaysRemove("e1")) self.assertFalse(iso.canAlwaysRemove("b2")) self.assertFalse(iso.canAlwaysRemove("d5")) self.assertFalse(iso.canAlwaysRemove("f4"))
def test_surroundings(self): iso = IsolatingHelper() surr = iso.getNeighbours("b2") self.assertEquals(surr, ["b3", "c2", "c1", "b1", "a1", "a2"])