[MRG+1] FIX: Modify test that tests state of warnings before and after assert_warns

Fixes https://github.com/scikit-learn/scikit-learn/issues/3626

The warnings registry is cleared before and after every call to `assert_warns`. (https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/testing.py#L146) This is because there might be cases when the warning is logged and does not raise a warning in the subsequent call.

So I suggest we remove this "test" and there is no use testing this any more.
Do you mean something like this?

        warnings.simplefilter("always", UserWarning)
        assert_equal(assert_warns(UserWarning, f), 3)

        # Test that the warning registry is empty after assert_warns
        assert_equal(sys.modules['warnings'].filters, [])

The purpose is to just test that the filters are unregistered internally by `assert_warns`?