This is the correct syntax for a doctest that raises an error.  I think the reason the test is failing is because the message in the exception is only:

```
Distance must be >= 0.
```

If the message should include the second sentence, then where it is raised (in `coordinates/distances.py`) should be updated.