How to sell a used engine?

If I was going to buy an engine that wouldn't idle I'd want the results of a compression test first so I could rule out any major valvetrain issues.
That way I could be pretty sure it was just a fuel/air or timing issue.