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

Method testRefCountGetNameInfo

Lib/test/test_socket.py:1219–1227  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1217 @unittest.skipUnless(hasattr(sys, 'getrefcount'),
1218 'test needs sys.getrefcount()')
1219 def testRefCountGetNameInfo(self):
1220 # Testing reference count for getnameinfo
1221 try:
1222 # On some versions, this loses a reference
1223 orig = sys.getrefcount(__name__)
1224 socket.getnameinfo(__name__,0)
1225 except TypeError:
1226 if sys.getrefcount(__name__) != orig:
1227 self.fail("socket.getnameinfo loses a reference")
1228
1229 def testInterpreterCrash(self):
1230 # Making sure getnameinfo doesn't crash the interpreter

Callers

nothing calls this directly

Calls 2

getnameinfoMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected