def test_word_splitter(self): text = u'Redistribution and use in source and binary forms, with or without modification, are permitted.' result = list(word_splitter(text)) expected = [ u'Redistribution', u'and', u'use', u'in', u'source', u'and', u'binary', u'forms', u'with', u'or', u'without', u'modification', u'are', u'permitted' ] assert result == expected
def test_word_splitter(self): text = u'Redistribution and use in source and binary forms, with or without modification, are permitted.' result = list(word_splitter(text)) expected = [ u'Redistribution', u'and', u'use', u'in', u'source', u'and', u'binary', u'forms', u'with', u'or', u'without', u'modification', u'are', u'permitted'] assert expected == result
def test_word_splitter_with_internal_plus(self): text = u'gpl-+3.0' result = list(word_splitter(text)) expected = [u'gpl', u'3', u'0'] assert result == expected
def test_word_splitter_with_trailing_plus(self): text = u'gpl-3.0+' result = list(word_splitter(text)) expected = [u'gpl', u'3', u'0+'] assert result == expected