Silence error logging while running tests that are intended to produce errors

The errors in the test log are distracting, making it look like
a test actually failed.