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

Method test_supernet_of

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

Source from the content-addressed store, hash-verified

862 self.factory('2000:aaa::%scope/48')))
863
864 def test_supernet_of(self):
865 # containee left of container
866 self.assertFalse(
867 self.factory('2000:999::/56').supernet_of(
868 self.factory('2000:aaa::/48')))
869 # containee inside container
870 self.assertFalse(
871 self.factory('2000:aaa::/56').supernet_of(
872 self.factory('2000:aaa::/48')))
873 # containee right of container
874 self.assertFalse(
875 self.factory('2000:bbb::/56').supernet_of(
876 self.factory('2000:aaa::/48')))
877 # containee larger than container
878 self.assertTrue(
879 self.factory('2000:aaa::/48').supernet_of(
880 self.factory('2000:aaa::/56')))
881
882
883class FactoryFunctionErrors(BaseTestCase):

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