MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_socket

Method test_socket

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

Source from the content-addressed store, hash-verified

115 self.assertSequenceEqual(["winreg.PyHKEY.Detach", " ", expected], events[4])
116
117 def test_socket(self):
118 import_helper.import_module("socket")
119 returncode, events, stderr = self.run_python("test_socket")
120 if returncode:
121 self.fail(stderr)
122
123 if support.verbose:
124 print(*events, sep='\n')
125 self.assertEqual(events[0][0], "socket.gethostname")
126 self.assertEqual(events[1][0], "socket.__new__")
127 self.assertEqual(events[2][0], "socket.bind")
128 self.assertTrue(events[2][2].endswith("('127.0.0.1', 8080)"))
129
130 def test_gc(self):
131 returncode, events, stderr = self.run_python("test_gc")

Callers

nothing calls this directly

Calls 7

run_pythonMethod · 0.95
assertTrueMethod · 0.80
printFunction · 0.50
import_moduleMethod · 0.45
failMethod · 0.45
assertEqualMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected