Fix tests for linux, ensure they pass on both python2 and python3.