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