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)
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)
def test_get_available_lexicon_traits(): result = get_available_lexicon_traits() check_trait_list(result)
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)