def test_check_errors():
    wc = WordCloud()
    assert_raises(NotImplementedError, wc.to_html)

    try:
        np.array(wc)
        raise AssertionError("np.array(wc) didn't raise")
    except __HOLE__ as e:
        assert_true("call generate" in str(e))

    try:
        wc.recolor()
        raise AssertionError("wc.recolor didn't raise")
    except ValueError as e:
        assert_true("call generate" in str(e))
dataset/ETHPy150Open amueller/word_cloud/test/test_wordcloud.py/test_check_errors