Python 3 compatibility for reloading test