Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(57202)

Unified Diff: Lib/test/test_shutil.py

Issue 15238: shutil.copystat should copy Linux extended attributes
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/shutil.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_shutil.py Sun Jul 01 12:24:20 2012 +0200
+++ b/Lib/test/test_shutil.py Tue Jul 03 09:05:12 2012 +0200
@@ -410,6 +410,14 @@
finally:
os.setxattr = orig_setxattr
+ # test that shutil.copystat copies xattrs
+ src = os.path.join(tmp_dir, 'the_original')
+ write_file(src, src)
+ os.setxattr(src, 'user.the_value', b'fiddly')
+ dst = os.path.join(tmp_dir, 'the_copy')
+ write_file(dst, dst)
+ shutil.copystat(src, dst)
+ self.assertEqual(os.listxattr(src), ['user.the_value'])
@support.skip_unless_symlink
@support.skip_unless_xattr
@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0,
« no previous file with comments | « Lib/shutil.py ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+