Commit e9da81c6 authored by Brian Curtin's avatar Brian Curtin

Fix assertRaises usage on reflection functions which should raise

NotImplementedError on Windows XP and below.
parent bea424af
......@@ -242,11 +242,14 @@ class LocalWinregTests(BaseWinregTests):
key = OpenKey(HKEY_CURRENT_USER, test_key_name)
self.assertNotEqual(key.handle, 0)
self.assertRaises(NotImplementedError, DisableReflectionKey(key))
self.assertRaises(NotImplementedError, EnableReflectionKey(key))
self.assertRaises(NotImplementedError, QueryReflectionKey(key))
self.assertRaises(NotImplementedError,
DeleteKeyEx(HKEY_CURRENT_USER, test_key_name))
with self.assertRaises(NotImplementedError):
DisableReflectionKey(key)
with self.assertRaises(NotImplementedError):
EnableReflectionKey(key)
with self.assertRaises(NotImplementedError):
QueryReflectionKey(key)
with self.assertRaises(NotImplementedError):
DeleteKeyEx(HKEY_CURRENT_USER, test_key_name)
finally:
DeleteKey(HKEY_CURRENT_USER, test_key_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment