TST: suppress gratuitous warnings
Merge pull request #8299 from seth-p/test_moments_warnings

TST: suppress gratuitous warnings in test_moments.py