示例#1
0
def test_get_available_lexicon_traits():
    result = get_available_lexicon_traits()
    assert result is not None
    assert isinstance(result, list)
    assert len(result) > 0
    for element in result:
        assert element is not None
        assert isinstance(element, str)
示例#2
0
def test_word_moral_value():
    words = ('loyalty', 'cat', 'dog', 'happiness', 'asdfg')
    for word in words:
        for moral_trait in get_available_lexicon_traits():
            result = word_moral_value(word, moral_trait)
            check_moral_value(result)
示例#3
0
def test_get_available_lexicon_traits():
    result = get_available_lexicon_traits()
    check_trait_list(result)
示例#4
0
def test_string_vader_moral():
    text = "My cat is loyal only to me."
    for moral_trait in get_available_lexicon_traits():
        result = string_vader_moral(text, moral_trait)
        assert isinstance(result, float)