'Test that element_of raises a useful error if we attempt to pass it an
array of choices that include the classifier\'s missing_value.'

def test_element_of_rejects_missing_value(self):

    missing = 'not    in    the    array'
    class C(Classifier, ):
        dtype = categorical_dtype
        missing_value = missing
        inputs = ()
        window_length = 0
    c = C()
    for bad_elems in ([missing], [missing, 'random    other    value']):
        with self.assertRaises(ValueError) as e:
            c.element_of(bad_elems)
        errmsg = str(e.exception)
        expected = "Found    self.missing_value    ('not    in    the    array')    in    choices    supplied    to    C.element_of().\nMissing    values    have    NaN    semantics,    so    the    requested    comparison    would    always    produce    False.\nUse    the    isnull()    method    to    check    for    missing    values.\nReceived    choices    were    {}.".format(bad_elems)
        self.assertEqual(errmsg, expected)
