def test_one_hot():
    text = 'The cat sat on the mat.'
    encoded = one_hot(text, 5)
    assert len(encoded) == 6
    assert np.max(encoded) <= 4
    assert np.min(encoded) >= 0
dataset/ETHPy150Open fchollet/keras/tests/keras/preprocessing/test_text.py/test_one_hot/original