This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author abkhd
Recipients
Date 2007-04-28.06:35:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
test_1686475 of test_os appears to rely on the
existence of "pagefile.sys" on the C drive like so:

def test_1686475(self):
    # Verify that an open file can be stat'ed
    try:
        os.stat(r"c:\pagefile.sys")
    except WindowsError, e:
        if e == 2: # file does not exist; cannot run test
            return
        self.fail("Could not stat pagefile.sys")


But since pagefile.sys may not be on every C
drive and since the exception object e is not a numeric then that test is probably going to fail if the pagefile.sys does not exist where it is expected.

In such a case Windows returns "[Error 5] Access is denied: 'c:\\pagefile.sys'". So we need to test if e.winerror == 5 to skip this and return without failing.

Patch "test_os.patch" is attached. 

By the way, I see the same problem in the trunk, so maybe this need to be applied there as well.
History
Date User Action Args
2007-08-23 15:58:16adminlinkissue1709112 messages
2007-08-23 15:58:16admincreate