It's been a long time, so I don't remember what I was thinking here. However, print statements such as these is something I like to put into my tests as diagnostics. While the test passes, nothing is printed by nose anyway, so no harm done. If the test starts failing for some reason, these lines print some basic info on "how badly" the test failed. This information is often useful in determining what the problem is.

As for the supression of warnings, that's to catch warnings from division by zero, which is likely to happen, and not a real problem in this case.