Speed up xml python test by only doing it once.