def test_valid_rotation(self): rotation = shifted_diff("coffee", "eecoff") self.assertEquals(rotation, 2) rotation = shifted_diff("eecoff", "coffee") self.assertEquals(rotation, 4)
def test_with_no_rotation(self): rotation = shifted_diff("Esham", "Esham") self.assertEquals(rotation, 0)
def test_invalid_rotation(self): rotation = shifted_diff("Moose", "moose") self.assertEquals(rotation, -1)
def test_valid_rotation_with_special_characters(self): rotation = shifted_diff("isn't", "'tisn") self.assertEquals(rotation, 2)