MCPcopy Index your code
hub / github.com/python/cpython / test_windows_message

Method test_windows_message

Lib/test/test_exceptions.py:440–446  ·  view source on GitHub ↗

Should fill in unknown error code in Windows error message

(self)

Source from the content-addressed store, hash-verified

438 @unittest.skipUnless(sys.platform == 'win32',
439 'test specific to Windows')
440 def test_windows_message(self):
441 """Should fill in unknown error code in Windows error message"""
442 ctypes = import_module('ctypes')
443 # this error code has no message, Python formats it as hexadecimal
444 code = 3765269347
445 with self.assertRaisesRegex(OSError, 'Windows Error 0x%x' % code):
446 ctypes.pythonapi.PyErr_SetFromWindowsErr(code)
447
448 def testAttributes(self):
449 # test that exception attributes are happy

Callers

nothing calls this directly

Calls 2

import_moduleFunction · 0.90
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected