diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-05-12 17:02:01 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-05-12 17:02:01 (GMT) |
commit | 424246fbf3953ccdb3b34961db007a453873a3ea (patch) | |
tree | 64fc5c2f67d12ae1ca24201d0569748f7df9352b /Lib/test/test_os.py | |
parent | 4d688e3275d5a10e2321571392cdc31945bb8a89 (diff) | |
download | cpython-424246fbf3953ccdb3b34961db007a453873a3ea.zip cpython-424246fbf3953ccdb3b34961db007a453873a3ea.tar.gz cpython-424246fbf3953ccdb3b34961db007a453873a3ea.tar.bz2 |
Issue #14082: shutil.copy2() now copies extended attributes, if possible.
Patch by Hynek Schlawack.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 0c15f22..066bf72 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -1810,25 +1810,7 @@ class TestSendfile(unittest.TestCase): raise -def supports_extended_attributes(): - if not hasattr(os, "setxattr"): - return False - try: - with open(support.TESTFN, "wb") as fp: - try: - os.fsetxattr(fp.fileno(), b"user.test", b"") - except OSError: - return False - finally: - support.unlink(support.TESTFN) - # Kernels < 2.6.39 don't respect setxattr flags. - kernel_version = platform.release() - m = re.match("2.6.(\d{1,2})", kernel_version) - return m is None or int(m.group(1)) >= 39 - - -@unittest.skipUnless(supports_extended_attributes(), - "no non-broken extended attribute support") +@support.skip_unless_xattr class ExtendedAttributeTests(unittest.TestCase): def tearDown(self): |