~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: John Arbash Meinel
  • Date: 2009-11-17 23:05:04 UTC
  • mto: This revision was merged to the branch mainline in revision 4806.
  • Revision ID: john@arbash-meinel.com-20091117230504-p05mbkihim789aq7
Document a bit more what 193 means, and why we are testing it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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"""
376
 
    def test_windows(self):
 
376
 
 
377
    def test_subprocess_call_bad_file(self):
377
378
        if sys.platform != "win32":
378
 
            raise TestSkipped("Workarounds for windows only")
 
379
            raise TestNotApplicable("Workarounds for windows only")
379
380
        import subprocess, errno
380
381
        ERROR_BAD_EXE_FORMAT = 193
381
382
        file("textfile.txt", "w").close()
382
383
        e = self.assertRaises(WindowsError, subprocess.call, "textfile.txt")
383
 
        if sys.version_info > (2, 5):
 
384
        # Python2.4 used the 'winerror' as the errno, which confuses a lot of
 
385
        # our error trapping code. Make sure that we understand the mapping
 
386
        # correctly.
 
387
        if sys.version_info >= (2, 5):
384
388
            self.assertEqual(e.errno, errno.ENOEXEC)
385
389
            self.assertEqual(e.winerror, ERROR_BAD_EXE_FORMAT)
386
390
        else: