Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

ResourceWarning #87

Open
Chaitanyabsprip opened this issue Jul 2, 2021 · 0 comments
Open

ResourceWarning #87

Chaitanyabsprip opened this issue Jul 2, 2021 · 0 comments

Comments

@Chaitanyabsprip
Copy link

Error

sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET6,
 type=SocketKind.SOCK_STREAM, proto=6, laddr=('2402:3a80:1874:9a5f:5e12:b50d:9beb:ef18', 60760, 0, 0),
 raddr=('2001:df2:e500:ed1a::1', 443, 0, 0)>

version:

wiktionaryparser==0.0.97
python 3.8

I came accross this when I was testing the parser with the word "anger"

    def test_get_meaning(self) -> None:
        expected: WordMeaning = WordMeaning(
            {
                Definition(
                    partOfSpeech='noun',
                    meanings={
                        "anger (countable and uncountable, plural angers)",
                        "A strong feeling of displeasure, hostility or antagonism towards someone or something, usually combined with an urge to harm.",
                        "(obsolete) Pain or stinging."
                    },
                    synonyms={"See also Thesaurus:anger"},
                    antonyms=set({}),
                    relatedWords={'anguish', 'anxiety', 'anxious'},
                    examples={
                        "Seeing the British establishment struggle with the financial sector is like watching an alcoholic[…]. Until 2008 there was denial over what finance had become. When a series of bank failures made this impossible, there was widespread anger, leading to the public humiliation of symbolic figures.",
                        "You need to control your anger.",
                        "It heals the Wounds that Sin hath made; and takes away the Anger of the Sore;  […]",
                        "I immediately made the Experiment, ſetting the Moxa where the firſt Violence of my Pain began, which was the Joint of the great Toe, and where the greateſt Anger and Soreneſs ſtill continued, [...]"
                    }),
                Definition(
                    partOfSpeech='verb',
                    meanings={
                        "anger (third-person singular simple present angers, present participle angering, simple past and past participle angered)",
                        "(transitive) To cause such a feeling of antagonism in.",
                        "(intransitive) To become angry."
                    },
                    synonyms={
                        "(to cause anger): enrage, infuriate; annoy, vex, grill, displease; aggravate, irritate",
                        "(to become angry): get angry (see angry for more)"
                    },
                    antonyms=set({}),
                    relatedWords=set({}),
                    examples={
                        "He who angers you conquers you.",
                        "You anger too easily."
                    })
            },
            pronounciation={
                "(UK) IPA: /ˈæŋɡə(ɹ)/", "(US) IPA: /ˈæŋɡɚ/",
                "Rhymes: -æŋɡə(ɹ)", "Hyphenation: an‧ger"
            },
            audio={
                "//upload.wikimedia.org/wikipedia/commons/d/dc/En-us-anger.ogg"
            })
        result = self.dictionary.get_meaning('anger') # internally calls WiktionaryParser().fetch
        self.assertEqual(result, expected)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant