TST: silence deprecation warnings for bad index calls

Some bad indexing calls throw exceptions and deprecations, silence the
warnings in the test.