I hang out with a lot of car guys. I have a friend who swears by the idea that whenever he wants to buy a used car, after a test drive he'll just leave it idling for an hour. If nothing goes wrong by that point he'll buy it.
The better tip is to test with a cold start. Lots of used car problems are masked with a warm engine. Sellers will often pre-warm the car, so note the engine temperature when you start it the first time.
Do both. They are complimentary tests. The cold start answers questions about the sensors and power systems needed to get the engine going. The idle tests the opposite, how the engine handles thermal issues without the airflow of driving. But the common theme is that if the engine starts and runs, most everything else can be reasonably fixed.
In my area, people talk about only buying cars in winter. You don't know a car until you see it at sub-zero temperatures.