def _requires_unix_version(sysname, min_version):
def decorator(func):<EOL><INDENT>@functools.wraps(func)<EOL>def wrapper(*args, **kw):<EOL><INDENT>if platform.system() == sysname:<EOL><INDENT>version_txt = platform.release().split('<STR_LIT:->', <NUM_LIT:1>)[<NUM_LIT:0>]<EOL>try:<EOL><INDENT>version = tuple(map(int, version_txt.split('<STR_LIT:.>')))<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if version < min_version:<EOL><INDENT>min_version_txt = '<STR_LIT:.>'.join(map(str, min_version))<EOL>raise unittest.SkipTest(<EOL>"<STR_LIT>"<EOL>% (sysname, min_version_txt, version_txt))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return wrapper<EOL><DEDENT>return decorator<EOL>
Decorator raising SkipTest if the OS is `sysname` and the version is less
    than `min_version`.

    For example, @_requires_unix_version('FreeBSD', (7, 2)) raises SkipTest if
    the FreeBSD version is less than 7.2.