test_base_events.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:ouroboros 作者: pybee 项目源码 文件源码
def test_check_resolved_sock_type(self):
        # Ensure we ignore extra flags in sock.type.
        if hasattr(socket, 'SOCK_NONBLOCK'):
            sock = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK)
            with sock:
                base_events._check_resolved_address(sock, ('1.2.3.4', 1))

        if hasattr(socket, 'SOCK_CLOEXEC'):
            sock = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_CLOEXEC)
            with sock:
                base_events._check_resolved_address(sock, ('1.2.3.4', 1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号