Skip to content

ResourceWarning: unclosed socket.socket when I run a unittest? #3912

Closed
@ghost

Description

requests show me following warning when I run a unittest:

ResourceWarning: unclosed <socket.socket fd=5, family=AddressFamily.AF_INET, 
type=SocketKind.SOCK_STREAM, proto=6, laddr=('219.82.68.148', 36006), raddr=('125.46.22.55', 80)>

But this warning won't happen if I don't run the code in a unittest environment.

Is there somebody who can tell me why this warning happen?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions