I purchased a mostly complete parts bike just for the motor, not too long ago. I was able to test ride it, to ensure that the motor ran, and shifted well.
The most important part of this is that I drained the oil, and dropped the oil screen before committing to the purchase. No "gold flecks" in the oil, and no bits ( or chunks ) of metal in the screen = a good used motor in my book.