e3bfcb1cde
As well as fixing the bug, I also rewrote the test to use data providers, which should lead to more useful failure messages. And, I moved the magic number we used as the float tolerence to be a named constant.