MCPcopy Create free account
hub / github.com/ceph/ceph / test_is_ipv6

Function test_is_ipv6

src/python-common/ceph/tests/test_utils.py:7–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def test_is_ipv6():
8 for good in ("[::1]", "::1",
9 "fff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"):
10 assert is_ipv6(good)
11 for bad in ("127.0.0.1",
12 "ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffg",
13 "1:2:3:4:5:6:7:8:9", "fd00::1::1", "[fg::1]"):
14 assert not is_ipv6(bad)
15
16
17def test_unwrap_ipv6():

Callers

nothing calls this directly

Calls 1

is_ipv6Function · 0.90

Tested by

no test coverage detected