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

Method test_long_key

Lib/test/test_winreg.py:326–338  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

324 DeleteKey(HKEY_CURRENT_USER, test_key_name)
325
326 def test_long_key(self):
327 # Issue2810, in 2.6 and 3.1 when the key name was exactly 256
328 # characters, EnumKey raised "WindowsError: More data is
329 # available"
330 name = 'x'*256
331 try:
332 with CreateKey(HKEY_CURRENT_USER, test_key_name) as key:
333 SetValue(key, name, REG_SZ, 'x')
334 num_subkeys, num_values, t = QueryInfoKey(key)
335 EnumKey(key, 0)
336 finally:
337 DeleteKey(HKEY_CURRENT_USER, '\\'.join((test_key_name, name)))
338 DeleteKey(HKEY_CURRENT_USER, test_key_name)
339
340 def test_dynamic_key(self):
341 # Issue2810, when the value is dynamically generated, these

Callers

nothing calls this directly

Calls 6

CreateKeyFunction · 0.85
SetValueFunction · 0.85
QueryInfoKeyFunction · 0.85
EnumKeyFunction · 0.85
DeleteKeyFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected