示例#1
0
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')
示例#2
0
文件: compilers.py 项目: LLNL/spack
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')
示例#3
0
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)
示例#4
0
文件: compilers.py 项目: LLNL/spack
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)