Exemple #1
0
def test_read_lines():
    words = trigrams.words_from_file(storyF)
    assert(len(words))
Exemple #2
0
def test_length_of_story():
    words = trigrams.words_from_file(storyF)
    dictionary = trigrams.trigrams_from_words(words)
    story = trigrams.story_from_trigrams(dictionary, 400)
    splitted_story = story.split(" ")
    assert(len(splitted_story) >= 300)
Exemple #3
0
def test_open_flie():
    trigrams.words_from_file(storyF)
Exemple #4
0
def test_is_trigrams_dictionary():
    words = trigrams.words_from_file(storyF)
    dictionary = trigrams.trigrams_from_words(words)
    assert(type(dictionary) == dict)