FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-73991: Fix "Operation not supported" on Fedora buildbot. by barneygale · Pull Request #121444 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
13 changes: 9 additions & 4 deletions Lib/test/test_pathlib/test_pathlib.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,6 @@ def test_open_unbuffered(self):
def test_copy_file_preserve_metadata(self):
base = self.cls(self.base)
source = base / 'fileA'
if hasattr(os, 'setxattr'):
os.setxattr(source, b'user.foo', b'42')
if hasattr(os, 'chmod'):
os.chmod(source, stat.S_IRWXU | stat.S_IRWXO)
if hasattr(os, 'chflags') and hasattr(stat, 'UF_NODUMP'):
Expand All @@ -670,12 +668,19 @@ def test_copy_file_preserve_metadata(self):
target_st = target.stat()
self.assertLessEqual(source_st.st_atime, target_st.st_atime)
self.assertLessEqual(source_st.st_mtime, target_st.st_mtime)
if hasattr(os, 'getxattr'):
self.assertEqual(os.getxattr(target, b'user.foo'), b'42')
self.assertEqual(source_st.st_mode, target_st.st_mode)
if hasattr(source_st, 'st_flags'):
self.assertEqual(source_st.st_flags, target_st.st_flags)

@os_helper.skip_unless_xattr
def test_copy_file_preserve_metadata_xattrs(self):
base = self.cls(self.base)
source = base / 'fileA'
os.setxattr(source, b'user.foo', b'42')
target = base / 'copyA'
source.copy(target, preserve_metadata=True)
self.assertEqual(os.getxattr(target, b'user.foo'), b'42')

@needs_symlinks
def test_copy_link_preserve_metadata(self):
base = self.cls(self.base)
Expand Down

Back | FazBrowse Home | New Git URL