def fstat(space, fd): """Perform a stat system call on the file referenced to by an open file descriptor.""" try: st = rposix_stat.fstat(fd) except OSError, e: raise wrap_oserror(space, e)
def test_fstat(self): stat = rposix_stat.fstat(0) # stdout assert stat.st_mode != 0