Matej Cepl 2024-02-29 01:27:25 +00:00 committed by Git OBS Bridge
parent ec6474e9bc
commit 9713a81b12

View File

@ -55,7 +55,7 @@
"were deleted")
d2.cleanup()
+ @support.skip_unless_symlink
+ @os_helper.skip_unless_symlink
+ def test_cleanup_with_symlink_modes(self):
+ # cleanup() should not follow symlinks when fixing mode bits (#91133)
+ with self.do_create(recurse=0) as d2:
@ -105,7 +105,7 @@
+ '%03o != %03o' % (new_mode, old_mode))
+
+ @unittest.skipUnless(hasattr(os, 'chflags'), 'requires os.chflags')
+ @support.skip_unless_symlink
+ @os_helper.skip_unless_symlink
+ def test_cleanup_with_symlink_flags(self):
+ # cleanup() should not follow symlinks when fixing flags (#91133)
+ flags = stat.UF_IMMUTABLE | stat.UF_NOUNLINK
@ -162,7 +162,7 @@
- @unittest.skipUnless(hasattr(os, 'chflags'), 'requires os.lchflags')
+ def check_flags(self, flags):
+ # skip the test if these flags are not supported (ex: FreeBSD 13)
+ filename = support.TESTFN
+ filename = os_helper.TESTFN
+ try:
+ open(filename, "w").close()
+ try: