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

Method test_socket

Lib/test/test_audit.py:126–137  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124 self.assertSequenceEqual(["winreg.PyHKEY.Detach", " ", expected], events[4])
125
126 def test_socket(self):
127 import_helper.import_module("socket")
128 returncode, events, stderr = self.run_python("test_socket")
129 if returncode:
130 self.fail(stderr)
131
132 if support.verbose:
133 print(*events, sep='\n')
134 self.assertEqual(events[0][0], "socket.gethostname")
135 self.assertEqual(events[1][0], "socket.__new__")
136 self.assertEqual(events[2][0], "socket.bind")
137 self.assertEndsWith(events[2][2], "('127.0.0.1', 8080)")
138
139 def test_gc(self):
140 returncode, events, stderr = self.run_python("test_gc")

Callers

nothing calls this directly

Calls 5

run_pythonMethod · 0.95
assertEndsWithMethod · 0.80
import_moduleMethod · 0.45
failMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected