Hashing fix3356

Fix for #3356 
I don't think the exact message generally needs to be checked but a
`ValueError` isn't a sufficient check on the desired functionality.


On 15 July 2014 16:28, Vlad Niculae <notifications@github.com> wrote:

>  In sklearn/feature_extraction/tests/test_text.py:
>
> > @@ -868,6 +868,19 @@ def test_non_unique_vocab():
> >      assert_raises(ValueError, CountVectorizer, vocabulary=vocab)
> >
> >
> > +def test_hashingvectorizer_nan_in_docs():
> > +    # np.nan can appear when using pandas to load text fields from a csv file
> > +    # with missing values.
> > +    message = "np.nan is an invalid document, expected byte or unicode string."
>
> I'm not crazy about checking for the exact error message, but I see why it
> needs to be like this.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/scikit-learn/scikit-learn/pull/3377/files#r14919025>.
>