__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# mypy: always-true=inet_pton
try:
from socket import inet_pton
except ImportError:
inet_pton = None # type: ignore[assignment]
if not inet_pton:
import socket
from .common import HyperlinkTestCase
from .._socket import inet_pton
class TestSocket(HyperlinkTestCase):
def test_inet_pton_ipv4_valid(self):
# type: () -> None
data = inet_pton(socket.AF_INET, "127.0.0.1")
assert isinstance(data, bytes)
def test_inet_pton_ipv4_bogus(self):
# type: () -> None
with self.assertRaises(socket.error):
inet_pton(socket.AF_INET, "blah")
def test_inet_pton_ipv6_valid(self):
# type: () -> None
data = inet_pton(socket.AF_INET6, "::1")
assert isinstance(data, bytes)
def test_inet_pton_ipv6_bogus(self):
# type: () -> None
with self.assertRaises(socket.error):
inet_pton(socket.AF_INET6, "blah")
def test_inet_pton_bogus_family(self):
# type: () -> None
# Find an integer not associated with a known address family
i = int(socket.AF_INET6)
while True:
if i != socket.AF_INET and i != socket.AF_INET6:
break
i += 100
with self.assertRaises(socket.error):
inet_pton(i, "127.0.0.1")
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 601 B | 0644 |
|
| common.py | File | 2.44 KB | 0644 |
|
| test_common.py | File | 3.59 KB | 0644 |
|
| test_decoded_url.py | File | 6.96 KB | 0644 |
|
| test_hypothesis.py | File | 7.23 KB | 0644 |
|
| test_parse.py | File | 1.08 KB | 0644 |
|
| test_scheme_registration.py | File | 2.97 KB | 0644 |
|
| test_socket.py | File | 1.39 KB | 0644 |
|
| test_url.py | File | 53.31 KB | 0644 |
|