def test_canFlip_pathsuccess_1(self): """Should return True when conditions met and testing for absolute values of generators""" # Testing negative generators bw = BraidWord([-1, -2, -1]) # Execution path True self.assertTrue(bw.canFlip(0))
def test_canFlip_pathsuccess_0(self): """Should return True when conditions met and testing only positive generators Refer to test_canFlip_pathfail_{0, 1}""" # Testing positive generators bw = BraidWord([1, 2, 1]) # Execution path True self.assertTrue(bw.canFlip(0))
def test_canFlip_pathfail_0(self): """Should return False if ~condP1: ( l[index] != l[(index+2) % len(l)] ) and should not modify word. """ bw = BraidWord([1, 2, 3]) # Execution path False self.assertFalse(bw.canFlip(0))
def test_canFlip_pathfail_1(self): """Should return False if ~condP2: abs(l[index] - l[(index+1) % len(l)]) != 1; and should not modify word. """ bw = BraidWord([1, 3, 1]) # Execution path False self.assertFalse(bw.canFlip(0))