def test_bad_mem(self):
self.failUnlessRaises(pywintypes.error, GetGlobalMemory, 0)
self.failUnlessRaises(pywintypes.error, GetGlobalMemory, -1)
if sys.getwindowsversion()[0] <= 5:
# For some reason, the value '1' dies from a 64bit process, but
# "works" (ie, gives the correct exception) from a 32bit process.
# just silently skip this value on Vista.
self.failUnlessRaises(pywintypes.error, GetGlobalMemory, 1)
评论列表
文章目录