Hi Patrick
Good question - I've wondered about this, too. But from the silence it looks like no one has a solution for you.
It would be easy enough to build a mock turtle (echoes of Alice In Wonderland!) in the template to record what turtle commands the student code issued. But validating those against a reference solution is difficult, at least in the general case.
Your triangle example, with integer coordinates, is relatively straightforward but even that has complications. The three lines could be drawn in any order and drawn in any direction. They could be drawn as individual lines with integer coordinates using turtle.goto() or using floating point distances with turtle.forward(). Or a filled polygon could be drawn with those three vertices - would that be accepted? Furthermore, it can be difficult to issue helpful error messages to the student when answers are deemed wrong: it's very frustrating for a student simply to be told their answer is wrong without a clear reason. Did they get marked wrong because they used 1.414 instead of math.sqrt(2) or did they draw a mirror image of the required answer or ... ?
If you make any progress on this, please tell us about it here :)
Richard