ENH #4163 Fixed tests in legacy mode