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

Method test_reflection_unsupported

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

Source from the content-addressed store, hash-verified

353 # or DeleteKeyEx so make sure their use raises NotImplementedError
354 @unittest.skipUnless(WIN_VER < (5, 2), "Requires Windows XP")
355 def test_reflection_unsupported(self):
356 try:
357 with CreateKey(HKEY_CURRENT_USER, test_key_name) as ck:
358 self.assertNotEqual(ck.handle, 0)
359
360 key = OpenKey(HKEY_CURRENT_USER, test_key_name)
361 self.assertNotEqual(key.handle, 0)
362
363 with self.assertRaises(NotImplementedError):
364 DisableReflectionKey(key)
365 with self.assertRaises(NotImplementedError):
366 EnableReflectionKey(key)
367 with self.assertRaises(NotImplementedError):
368 QueryReflectionKey(key)
369 with self.assertRaises(NotImplementedError):
370 DeleteKeyEx(HKEY_CURRENT_USER, test_key_name)
371 finally:
372 DeleteKey(HKEY_CURRENT_USER, test_key_name)
373
374 def test_setvalueex_value_range(self):
375 # Test for Issue #14420, accept proper ranges for SetValueEx.

Callers

nothing calls this directly

Calls 9

CreateKeyFunction · 0.85
OpenKeyFunction · 0.85
DisableReflectionKeyFunction · 0.85
EnableReflectionKeyFunction · 0.85
QueryReflectionKeyFunction · 0.85
DeleteKeyExFunction · 0.85
DeleteKeyFunction · 0.85
assertNotEqualMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected