373
373
# GZ 2009-11-17: This wants moving to osutils when the errno checking code is
374
374
class TestPlatformErrnoWorkarounds(TestCaseInTempDir):
375
375
"""Ensuring workarounds enshrined in code actually serve a purpose"""
377
378
if sys.platform != "win32":
380
381
ERROR_BAD_EXE_FORMAT = 193
381
382
file("textfile.txt", "w").close()
382
383
e = self.assertRaises(WindowsError, subprocess.call, "textfile.txt")
384
388
self.assertEqual(e.errno, errno.ENOEXEC)
385
389
self.assertEqual(e.winerror, ERROR_BAD_EXE_FORMAT)