Example #1
0
def test__getfileinformation():
    with open(__file__) as fp:
        stat = os.fstat(fp.fileno())
        info = nt._getfileinformation(fp.fileno())
    serial, high, low = info
    assert type(serial) in (int, long)
    assert (high << 32) + low == stat.st_ino
Example #2
0
 def _getfileinformation(space, fd):
     try:
         info = nt._getfileinformation(fd)
     except OSError as e:
         raise wrap_oserror(space, e)
     return space.newtuple([space.wrap(info[0]),
                            space.wrap(info[1]),
                            space.wrap(info[2])])
Example #3
0
 def _getfileinformation(space, fd):
     try:
         info = nt._getfileinformation(fd)
     except OSError as e:
         raise wrap_oserror(space, e)
     return space.newtuple(
         [space.wrap(info[0]),
          space.wrap(info[1]),
          space.wrap(info[2])])