Make weave tests behave

This PR adds an additional commit to @rgommer's https://github.com/scipy/scipy/pull/3182

Two changes are trivial, but at least one other set of eyes should check the removal of `test_function()`.