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

Method test_supernet_of

Lib/test/test_ipaddress.py:694–710  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

692 self.factory('10.0.0.0/30')))
693
694 def test_supernet_of(self):
695 # containee left of container
696 self.assertFalse(
697 self.factory('10.0.0.0/30').supernet_of(
698 self.factory('10.0.1.0/24')))
699 # containee inside container
700 self.assertFalse(
701 self.factory('10.0.0.0/30').supernet_of(
702 self.factory('10.0.0.0/24')))
703 # containee right of container
704 self.assertFalse(
705 self.factory('10.0.0.0/30').supernet_of(
706 self.factory('10.0.1.0/24')))
707 # containee larger than container
708 self.assertTrue(
709 self.factory('10.0.0.0/24').supernet_of(
710 self.factory('10.0.0.0/30')))
711
712 def test_subnet_of_mixed_types(self):
713 with self.assertRaises(TypeError):

Callers

nothing calls this directly

Calls 4

assertFalseMethod · 0.80
supernet_ofMethod · 0.80
assertTrueMethod · 0.80
factoryMethod · 0.45

Tested by

no test coverage detected