Skip to content

Commit 5e5a8a6

Browse files
committed
Improve test coverage
1 parent a7925be commit 5e5a8a6

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

multiaddr/util.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,4 @@ def packed_net_bytes_to_int(b):
2828
else: # PY2
2929
def packed_net_bytes_to_int(b):
3030
"""Convert the given big-endian byte-string to an int."""
31-
return int(b.encode('hex'), 16)
32-
33-
34-
def decode_big_endian_16(b):
35-
return struct.unpack_from('>H', b.rjust(2, b'\0'))[0]
31+
return int(b.encode('hex'), 16)

tests/test_multiaddr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def test_invalid(addr_str):
7171
"/udp/1234",
7272
"/tcp/1234",
7373
"/sctp/1234",
74+
"/utp",
7475
"/udp/65535",
7576
"/tcp/65535",
7677
"/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC",

0 commit comments

Comments
 (0)