Beispiel #1
0
def test_getdirinfo(tmp_path):
    # simulate someone holding an exclussive access
    locked = str(tmp_path / "locked")
    fd = os.open(locked, os.O_WRONLY | os.O_CREAT | os.O_EXCL)
    try:
        # should not raise WinError
        System.getdirinfo(locked)
    finally:
        os.close(fd)
Beispiel #2
0
    def test_getdirinfo(self):
        if os.name != "nt":
            return

        # simulate someone holding an exclussive access
        locked = "locked"
        fd = os.open(locked, os.O_WRONLY | os.O_CREAT | os.O_EXCL)

        # should not raise WinError
        System.getdirinfo(locked)

        os.close(fd)