Made test more resilient to data changes on PyPI.
Tidied up version code.