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

Method test_winreg

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

Source from the content-addressed store, hash-verified

101 )
102
103 def test_winreg(self):
104 import_helper.import_module("winreg")
105 returncode, events, stderr = self.run_python("test_winreg")
106 if returncode:
107 self.fail(stderr)
108
109 self.assertEqual(events[0][0], "winreg.OpenKey")
110 self.assertEqual(events[1][0], "winreg.OpenKey/result")
111 expected = events[1][2]
112 self.assertTrue(expected)
113 self.assertSequenceEqual(["winreg.EnumKey", " ", f"{expected} 0"], events[2])
114 self.assertSequenceEqual(["winreg.EnumKey", " ", f"{expected} 10000"], events[3])
115 self.assertSequenceEqual(["winreg.PyHKEY.Detach", " ", expected], events[4])
116
117 def test_socket(self):
118 import_helper.import_module("socket")

Callers

nothing calls this directly

Calls 6

run_pythonMethod · 0.95
assertTrueMethod · 0.80
assertSequenceEqualMethod · 0.80
import_moduleMethod · 0.45
failMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected