The answer is, you would never know the condition of a used part.
You could however test it for flow and pressure.
Keep in mind that this is just a discussion.
Yes... it could be put on a flow bench and tested.
But to do that, it would have to be removed from the tractor, paid for in full and then taken to the shop for testing. Now, I do not know of any shops that work for free. It does take time to first identify the pump being tested, look up the specs for that pump, hook it up to the flow bench and run the tests. It is common to issue a report in writing on the findings.
So after doing all of this and finding out that the pump is marginal at best, then what? Will the wrecking yard refund the price paid for the pump in full? Who will eat the cost of the flow bench test?
Lastly, if a brand new pump can be had for $250.00, then where is the logic in buying a used pump?
If the subject machine was a hydrostatic drive crawler loader and the pump cost 3 grand brand new, then that would be different, especially if the pump was proprietary. Perhaps the pump for this little tractor is not proprietary and a common off-the-shelf SAE A pump from Surplus Centre will fill the bill. Is it not logical to explore that option first before scouring the countryside for pump that may be almost as worn out as the pump it is replacing?