MCPcopy Index your code
hub / github.com/python/cpython / assertBadNetmask

Method assertBadNetmask

Lib/test/test_ipaddress.py:635–638  ·  view source on GitHub ↗
(addr, netmask)

Source from the content-addressed store, hash-verified

633
634 def test_netmask_errors(self):
635 def assertBadNetmask(addr, netmask):
636 msg = "%r is not a valid netmask" % netmask
637 with self.assertNetmaskError(re.escape(msg)):
638 self.factory("%s/%s" % (addr, netmask))
639
640 assertBadNetmask("1.2.3.4", "")
641 assertBadNetmask("1.2.3.4", "-1")

Callers

nothing calls this directly

Calls 3

assertNetmaskErrorMethod · 0.80
escapeMethod · 0.80
factoryMethod · 0.45

Tested by

no test coverage detected