Refactor AstropyTest to make it easier to subclass.

Split out most of run() into different methods so that you can override the calling signature without rewriting all the bolierplate code.
changed.