fix test driver to work on python older than 2.7