fix test discovery
fix some python3 syntax errors