Python 3 compatibility in test_grid_in_lazy_connect.