mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-18802: Add more details to ipaddress documentation (GH-6083)
Original patch by Jon Foster and Berker Peksag.
This commit is contained in:
parent
4be79f2946
commit
5609b78392
3 changed files with 51 additions and 16 deletions
|
@ -404,6 +404,9 @@ class AddressTestCase_v6(BaseTestCase, CommonTestMixin_v6):
|
|||
class NetmaskTestMixin_v4(CommonTestMixin_v4):
|
||||
"""Input validation on interfaces and networks is very similar"""
|
||||
|
||||
def test_no_mask(self):
|
||||
self.assertEqual(str(self.factory('1.2.3.4')), '1.2.3.4/32')
|
||||
|
||||
def test_split_netmask(self):
|
||||
addr = "1.2.3.4/32/24"
|
||||
with self.assertAddressError("Only one '/' permitted in %r" % addr):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue