def test_version_detection_is_successful(): version = lambda x: '4.9' compiler_check_tuple = ('/usr/bin/gcc', '', r'\d\d', version) assert _get_versioned_tuple(compiler_check_tuple) == ('4.9', '', r'\d\d', '/usr/bin/gcc')
def test_version_detection_is_successful(): version = lambda x: '4.9' compiler_check_tuple = ('/usr/bin/gcc', '', r'\d\d', version) assert _get_versioned_tuple(compiler_check_tuple) == ( '4.9', '', r'\d\d', '/usr/bin/gcc')
def test_version_detection_is_empty(): no_version = lambda x: None compiler_check_tuple = ('/usr/bin/gcc', '', r'\d\d', no_version) assert not _get_versioned_tuple(compiler_check_tuple)