More work on making tests work on Python 3