Skip to content

Commit 54043df

Browse files
committed
more tests
1 parent 17a1a05 commit 54043df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_ipaddress.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,8 @@ def testHosts(self):
15081508
addrs = [ipaddress.IPv4Address('1.2.3.4')]
15091509
str_args = '1.2.3.4/32'
15101510
tpl_args = ('1.2.3.4', 32)
1511+
self.assertIsInstance(ipaddress.ip_network(str_args).hosts(), Iterator)
1512+
self.assertIsInstance(ipaddress.ip_network(tpl_args).hosts(), Iterator)
15111513
self.assertEqual(addrs, list(ipaddress.ip_network(str_args).hosts()))
15121514
self.assertEqual(addrs, list(ipaddress.ip_network(tpl_args).hosts()))
15131515
self.assertEqual(list(ipaddress.ip_network(str_args).hosts()),
@@ -1517,6 +1519,8 @@ def testHosts(self):
15171519
ipaddress.IPv6Address('2001:658:22a:cafe::1')]
15181520
str_args = '2001:658:22a:cafe::/127'
15191521
tpl_args = ('2001:658:22a:cafe::', 127)
1522+
self.assertIsInstance(ipaddress.ip_network(str_args).hosts(), Iterator)
1523+
self.assertIsInstance(ipaddress.ip_network(tpl_args).hosts(), Iterator)
15201524
self.assertEqual(addrs, list(ipaddress.ip_network(str_args).hosts()))
15211525
self.assertEqual(addrs, list(ipaddress.ip_network(tpl_args).hosts()))
15221526
self.assertEqual(list(ipaddress.ip_network(str_args).hosts()),

0 commit comments

Comments
 (0)