so it would be a good thing to test it before and after the test drive then.

(makes mental note)

i suppose if a code did appear after a test drive, it could be an indication of a dealer trying to be a bit "dodgy". however there could always be the coincidence that the fault genuinely first appeared during the test drive.