diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-24 15:50:41 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-24 15:50:41 (GMT) |
commit | f95a19b900262c32d1038a6ab9a6808a58656c34 (patch) | |
tree | 7abfa4aa2fb53569603b90daaecfbc88fb9a2560 /Lib | |
parent | bc6b72ed06318a80a68b4bbf513a0e055b102e11 (diff) | |
download | cpython-f95a19b900262c32d1038a6ab9a6808a58656c34.zip cpython-f95a19b900262c32d1038a6ab9a6808a58656c34.tar.gz cpython-f95a19b900262c32d1038a6ab9a6808a58656c34.tar.bz2 |
test_os: use @support.requires_linux_version
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_os.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index bac839d..b317e33 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -15,7 +15,6 @@ import locale import mmap import os import pickle -import platform import re import shutil import signal @@ -2456,14 +2455,14 @@ def supports_extended_attributes(): 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 + + return True @unittest.skipUnless(supports_extended_attributes(), "no non-broken extended attribute support") +# Kernels < 2.6.39 don't respect setxattr flags. +@support.requires_linux_version(2, 6, 39) class ExtendedAttributeTests(unittest.TestCase): def tearDown(self): |