Skip to content

Commit a9f1af4

Browse files
add Multiaddr.__hash__ testing coverage
1 parent d19fdf2 commit a9f1af4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_multiaddr.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,3 +355,9 @@ def test_zone():
355355

356356
maddr_from_bytes = Multiaddr(ip6_bytes)
357357
assert str(maddr_from_bytes) == ip6_string
358+
359+
360+
def test_hash():
361+
addr_bytes = Multiaddr("/ip4/127.0.0.1/udp/1234").to_bytes()
362+
363+
assert hash(Multiaddr(addr_bytes)) == hash(addr_bytes)

0 commit comments

Comments
 (0)