def test_unigram_tokenizer(self):
    inp = u'Redistribution and use in source and binary forms, with or\n        without modification, are permitted provided that the following\n        conditions are met:\n        Redistributions of source code must retain the above\n        copyright notice, this list of conditions and the following\n        disclaimer.'
    tst = list(unigram_tokenizer(inp.splitlines(True)))
    assert (39 == len(tst))
    expected = u'redistribution and use in source and binary forms with or\n        without modification are permitted provided that the following\n        conditions are met redistributions of source code must retain the above\n        copyright notice this list of conditions and the following\n        disclaimer'.split()
    result = [t.value for t in tst]
    assert (expected == result)
def test_unigram_tokenizer(self):
    inp = u'Redistribution and use in source and binary forms, with or\n        without modification, are permitted provided that the following\n        conditions are met:\n        Redistributions of source code must retain the above\n        copyright notice, this list of conditions and the following\n        disclaimer.'
    tst = list(unigram_tokenizer(inp.splitlines(True)))
    assert (39 == len(tst))
    expected = u'redistribution and use in source and binary forms with or\n        without modification are permitted provided that the following\n        conditions are met redistributions of source code must retain the above\n        copyright notice this list of conditions and the following\n        disclaimer'.split()
    result = [t.value for t in tst]
    assert (expected == result)