TST: silence deprecation warnings for bad index calls

Some bad indexing calls throw exceptions and deprecations, silence the
warnings in the test.

The deprecation on error should be fixed but its probably too late to do that for 1.9 now, so silence the warnings in the branch but keep them in master, see gh-4991