Lines Matching defs:stat
18 import stat
625 self.assertTrue(posix.stat(fp.fileno()))
629 posix.stat, float(fp.fileno()))
634 self.assertTrue(posix.stat(os_helper.TESTFN))
635 self.assertTrue(posix.stat(os.fsencode(os_helper.TESTFN)))
639 posix.stat, bytearray(os.fsencode(os_helper.TESTFN)))
642 posix.stat, None)
645 posix.stat, list(os_helper.TESTFN))
648 posix.stat, list(os.fsencode(os_helper.TESTFN)))
659 posix.mkfifo(fifo_path, stat.S_IRUSR | stat.S_IWUSR)
662 self.assertTrue(stat.S_ISFIFO(posix.stat(fifo_path).st_mode))
664 @unittest.skipUnless(hasattr(posix, 'mknod') and hasattr(stat, 'S_IFIFO'),
670 mode = stat.S_IFIFO | stat.S_IRUSR | stat.S_IWUSR
678 self.assertTrue(stat.S_ISFIFO(posix.stat(os_helper.TESTFN).st_mode))
690 st = posix.stat(os_helper.TESTFN)
721 stat = stat_func(first_param)
722 self.assertEqual(stat.st_uid, uid)
723 self.assertEqual(stat.st_gid, gid)
798 self._test_all_chown_common(posix.chown, os_helper.TESTFN, posix.stat)
937 st = os.stat(target_file)
941 flags = st.st_flags | stat.UF_IMMUTABLE
951 new_st = os.stat(target_file)
952 self.assertEqual(st.st_flags | stat.UF_IMMUTABLE, new_st.st_flags)
972 testfn_st = os.stat(os_helper.TESTFN)
985 flags = dummy_symlink_st.st_flags | stat.UF_IMMUTABLE
994 new_testfn_st = os.stat(os_helper.TESTFN)
998 self.assertEqual(dummy_symlink_st.st_flags | stat.UF_IMMUTABLE,
1290 self.assertRaises(ValueError, os.stat, fn_with_NUL)
1308 self.assertRaises(ValueError, os.stat, fn_with_NUL)
1353 posix.chmod(fullname, stat.S_IRUSR)
1354 posix.chmod(name, stat.S_IRUSR | stat.S_IWUSR, dir_fd=dir_fd)
1355 s = posix.stat(fullname)
1356 self.assertEqual(s.st_mode & stat.S_IRWXU,
1357 stat.S_IRUSR | stat.S_IWUSR)
1366 @unittest.skipUnless(os.stat in os.supports_dir_fd, "test needs dir_fd support in os.stat()")
1373 s1 = posix.stat(fullname)
1374 s2 = posix.stat(name, dir_fd=dir_fd)
1376 s2 = posix.stat(fullname, dir_fd=None)
1380 posix.stat, name, dir_fd=posix.getcwd())
1382 posix.stat, name, dir_fd=float(dir_fd))
1384 posix.stat, name, dir_fd=10**20)
1434 self.assertEqual(posix.stat(fullname)[1],
1435 posix.stat(fulllinkname)[1])
1442 posix.stat(fullname) # should not raise exception
1446 and hasattr(stat, 'S_IFIFO'),
1447 "test requires both stat.S_IFIFO and dir_fd support for os.mknod()")
1452 mode = stat.S_IFIFO | stat.S_IRUSR | stat.S_IWUSR
1461 self.assertTrue(stat.S_ISFIFO(posix.stat(fullname).st_mode))
1490 posix.stat(fullname2) # should not raise exception
1504 posix.stat(fullname) # should not raise exception
1507 self.assertRaises(OSError, posix.stat, fullname)
1516 posix.mkfifo(name, stat.S_IRUSR | stat.S_IWUSR, dir_fd=dir_fd)
1520 self.assertTrue(stat.S_ISFIFO(posix.stat(fullname).st_mode))
1858 stat.S_IRUSR | stat.S_IWUSR),
1986 os.stat("file", dir_fd=0)