def requires_mac_ver(*min_version):
def decorator(func):<EOL><INDENT>@functools.wraps(func)<EOL>def wrapper(*args, **kw):<EOL><INDENT>if sys.platform == '<STR_LIT>':<EOL><INDENT>version_txt = platform.mac_ver()[<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>% (min_version_txt, version_txt))<EOL><DEDENT><DEDENT><DEDENT>return func(*args, **kw)<EOL><DEDENT>wrapper.min_version = min_version<EOL>return wrapper<EOL><DEDENT>return decorator<EOL>
Decorator raising SkipTest if the OS is Mac OS X and the OS X
    version if less than min_version.

    For example, @requires_mac_ver(10, 5) raises SkipTest if the OS X version
    is lesser than 10.5.