However, just because you can drive straight after passing your test, it doesn’t mean that should. Regardless of whether you have passed or failed, driving tests are very mentally draining and for this reason, driving instructors almost always drive the test candidate home after their test.
Even if you passed, you’re going to be understandably very exited which may impair your driving judgement, so it’s probably a good idea to let the person that was supervising you on the way to the test, drive you home.