• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

romis2012 / python-socks / 88

pending completion
88

push

travis-ci-com

romis2012
Read socks5 server bound address

26 of 26 new or added lines in 3 files covered. (100.0%)

1588 of 1596 relevant lines covered (99.5%)

3.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/python_socks/async_/anyio/_resolver.py
1
import anyio
4✔
2
import socket
4✔
3

4
from ... import _abc as abc
4✔
5

6

7
class Resolver(abc.AsyncResolver):
4✔
8
    async def resolve(self, host, port=0, family=socket.AF_UNSPEC):
4✔
9
        infos = await anyio.getaddrinfo(
4✔
10
            host=host,
11
            port=port,
12
            family=family,
13
            type=socket.SOCK_STREAM,
14
        )
15

16
        if not infos:  # pragma: no cover
17
            raise OSError('Can`t resolve address {}:{} [{}]'.format(host, port, family))
18

19
        infos = sorted(infos, key=lambda info: info[0])
4✔
20

21
        family, _, _, _, address = infos[0]
4✔
22
        return family, address[0]
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc