Add a python test to check a strange behavior with the distance task.