Plenty of people failed the driving test, though.
If you're curious whether road police is corrupted, as many believe, the industrial approach to fighting this actually works and gradually decreases corruption. In 2000-2008 you could literally pay for a licence and get it without any effort. In 2010 more rules were introduced, and the risk for the bureaucrats for doing this increased drammatically, so you had to go to driving school, but could bribe the exam inspector. Since then, inspectors would try extorting bribes by making you fail. The federal govt is fighting this as well: couple of years ago, the exams started to be videotaped. The video is kept for some months. Any case of incidents or if bribery is reported, a team of investigators starts analyzing videos, and they may take away the issued licenses as well as make criminal charges against the exam inspectors. (When I was driving, the instructor was talking on the phone discussing that our local road police was being under such inspection right in those days, and everyone there were scared.) Stakes for bribery increased dramatically.
I personally would prefer less industrial approach and more social capital, trust and honesty among people, but that's another story.
You have compulsory 50 hours of lectures (though it's up to each driving school whether to enforce it or not), 27 compulsory driving lessons 1.5 hours each. Theory test is standardized for the entire country, to be exact it's 800 same questions for the whole country issued every year. The exam is done on computers, over internet, so that local police can't help the examinees. The exam is also videotaped to catch those who cheat.
Our driving school made preliminary test of 40 questions, and I think the success rate was 80%.
At driving test, roughly half of people failed.
Also, under 50% of learner drivers pass their first practical test, which involves a 40 minute drive on public roads with an independent driving section and manouvres like parallel parking and bay parking, plus a bunch of questions you have to get right. You'll fail for stuff like not checking your mirror often enough, not checking blind spots, going too fast, going too slow, incorrect positioning at junctions, and so on.
This helped avoid learning all those 1000 test questions, what most students did.
And using computer simulator with 3 pedals helped to automate the movements, and think of subtleties. Reportedly, those who had no practice before driving school, under the pressure of the exam, didn't stall the engine, but failed exactly in higher-order matters, like they'd cross continuous lines or not notice speed limit signs.