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

Method test_reflection_functions

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

Source from the content-addressed store, hash-verified

462
463 @unittest.skipIf(win32_edition() in ('WindowsCoreHeadless', 'IoTEdgeOS'), "APIs not available on WindowsCoreHeadless")
464 def test_reflection_functions(self):
465 # Test that we can call the query, enable, and disable functions
466 # on a key which isn't on the reflection list with no consequences.
467 with OpenKey(HKEY_LOCAL_MACHINE, "Software") as key:
468 # HKLM\Software is redirected but not reflected in all OSes
469 self.assertTrue(QueryReflectionKey(key))
470 self.assertIsNone(EnableReflectionKey(key))
471 self.assertIsNone(DisableReflectionKey(key))
472 self.assertTrue(QueryReflectionKey(key))
473
474 @unittest.skipUnless(HAS_REFLECTION, "OS doesn't support reflection")
475 def test_reflection(self):

Callers

nothing calls this directly

Calls 6

OpenKeyFunction · 0.85
QueryReflectionKeyFunction · 0.85
EnableReflectionKeyFunction · 0.85
DisableReflectionKeyFunction · 0.85
assertTrueMethod · 0.80
assertIsNoneMethod · 0.80

Tested by

no test coverage detected