It is only a formality because the majority party has already decided on the matter beforehand. The election is rather a tradition if anything.
The white minority government in Rhodesia gave up power to the black majority after B) a long guerrilla war.