def test_flat (): key = registry.registry (TEST_KEY) print list (registry.flat (key)) assert list (registry.flat (key)) == [ key, ("winsys1", GUID), ("winsys2", GUID), key + "win:sys3", ("winsys3", GUID), key + "winsys2", ("winsys2", GUID) ]
def test_flat_ignore_access_denied (): remove_access (r"software\winsys\winsys2") try: key = registry.registry (TEST_KEY) assert list (registry.flat (key, ignore_access_errors=True)) == [ key, ("winsys1", GUID), ("winsys2", GUID), ] finally: restore_access (r"software\winsys\winsys2")
def test_flat_ignore_access_denied(self): remove_access(r"software\winsys\winsys2") try: key = registry.registry(TEST_KEY) self.assertEqual( list(registry.flat(key, ignore_access_errors=True)), [ key, ("winsys1", GUID), ("winsys2", GUID), key + "win:sys3", ("winsys3", GUID), ]) finally: restore_access(r"software\winsys\winsys2")
def test_flat(self): key = registry.registry(TEST_KEY) self.assertEqual( list(registry.flat(key)), [ key, ("winsys1", GUID), ("winsys2", GUID), key + "win:sys3", ("winsys3", GUID), key + "winsys2", ("winsys2", GUID) ] )
def test_flat_access_denied (self): with self.assertRaises (registry.exc.x_access_denied): key = registry.registry (TEST_KEY, access=registry.REGISTRY_ACCESS.KEY_NOTIFY) list (registry.flat (key))
def test_flat(self): key = registry.registry(TEST_KEY) self.assertEqual(list(registry.flat(key)), [ key, ("winsys1", GUID), ("winsys2", GUID), key + "win:sys3", ("winsys3", GUID), key + "winsys2", ("winsys2", GUID) ])
def test_flat_access_denied(self): with self.assertRaises(registry.exc.x_access_denied): key = registry.registry(TEST_KEY, access=registry.REGISTRY_ACCESS.KEY_NOTIFY) list(registry.flat(key))
def test_flat_access_denied (): key = registry.registry (TEST_KEY, access=registry.REGISTRY_ACCESS.KEY_NOTIFY) list (registry.flat (key))