TST fix test failure due to warning registry

Partially reverts cd7b43ccf97c2333380d0b3f5701d579ee8837c8. I must admit I've no clue what's going on; the patch looked good, and only 2.6 fails.