当前位置: 首页>>代码示例>>Python>>正文


Python TOC.insert方法代码示例

本文整理汇总了Python中PyInstaller.building.datastruct.TOC.insert方法的典型用法代码示例。如果您正苦于以下问题:Python TOC.insert方法的具体用法?Python TOC.insert怎么用?Python TOC.insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyInstaller.building.datastruct.TOC的用法示例。


在下文中一共展示了TOC.insert方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_insert_other_case_pymodule

# 需要导入模块: from PyInstaller.building.datastruct import TOC [as 别名]
# 或者: from PyInstaller.building.datastruct.TOC import insert [as 别名]
def test_insert_other_case_pymodule():
    # python modules should not use C-I comparisons. Both 'encodings' and
    # 'EnCodIngs' should be added.
    toc = TOC(ELEMS1)
    elem = ('EnCodIngs', '/usr/lib/python2.7/encodings.py', 'PYMODULE')
    toc.insert(1, elem)
    expected = list(ELEMS1)
    expected.insert(1, elem)
    assert toc == expected
开发者ID:ChaiZQ,项目名称:pyinstaller,代码行数:11,代码来源:test_TOC.py

示例2: test_insert_other_case_mixed

# 需要导入模块: from PyInstaller.building.datastruct import TOC [as 别名]
# 或者: from PyInstaller.building.datastruct.TOC import insert [as 别名]
def test_insert_other_case_mixed():
    # If a binary file is added with the same filename as an existing pymodule,
    # it should not be added

    toc = TOC(ELEMS1)
    elem = ('EnCodIngs', '/usr/lib/python2.7/encodings.py', 'BINARY')
    toc.insert(1, elem)
    expected = list(ELEMS1)
    assert toc == expected
开发者ID:ChaiZQ,项目名称:pyinstaller,代码行数:11,代码来源:test_TOC.py

示例3: test_insert_keep_filename

# 需要导入模块: from PyInstaller.building.datastruct import TOC [as 别名]
# 或者: from PyInstaller.building.datastruct.TOC import insert [as 别名]
def test_insert_keep_filename():
    # name in TOC should be the same as the one added
    toc = TOC()
    entry = ('EnCodIngs', '/usr/lib/python2.7/encodings.py', 'BINARY')
    toc.insert(1, entry)
    assert toc[0][0] == entry[0]
开发者ID:ChaiZQ,项目名称:pyinstaller,代码行数:8,代码来源:test_TOC.py

示例4: test_insert_existing

# 需要导入模块: from PyInstaller.building.datastruct import TOC [as 别名]
# 或者: from PyInstaller.building.datastruct.TOC import insert [as 别名]
def test_insert_existing():
    toc = TOC(ELEMS1)
    toc.insert(0, ELEMS1[-1])
    toc.insert(1, ELEMS1[-1])
    expected = list(ELEMS1)
    assert toc == expected
开发者ID:ChaiZQ,项目名称:pyinstaller,代码行数:8,代码来源:test_TOC.py

示例5: test_insert

# 需要导入模块: from PyInstaller.building.datastruct import TOC [as 别名]
# 或者: from PyInstaller.building.datastruct.TOC import insert [as 别名]
def test_insert():
    toc = TOC(ELEMS1)
    toc.insert(1, ('li-la-lu', '/home/myself/li-la-su', 'SOMETHING'))
    expected = list(ELEMS1)
    expected.insert(1, ('li-la-lu', '/home/myself/li-la-su', 'SOMETHING'))
    assert toc == expected
开发者ID:ChaiZQ,项目名称:pyinstaller,代码行数:8,代码来源:test_TOC.py

示例6: test_insert_other_case_binary

# 需要导入模块: from PyInstaller.building.datastruct import TOC [as 别名]
# 或者: from PyInstaller.building.datastruct.TOC import insert [as 别名]
def test_insert_other_case_binary():
    # binary files should use C-I comparisons. 'LiBrEADlInE.so.6' should not be added.
    toc = TOC(ELEMS1)
    toc.insert(1, ('LiBrEADlInE.so.6', '/lib64/libreadline.so.6', 'BINARY'))
    expected = list(ELEMS1)
    assert toc == expected
开发者ID:ChaiZQ,项目名称:pyinstaller,代码行数:8,代码来源:test_TOC.py

示例7: test_insert_other_case

# 需要导入模块: from PyInstaller.building.datastruct import TOC [as 别名]
# 或者: from PyInstaller.building.datastruct.TOC import insert [as 别名]
def test_insert_other_case():
    # should not be added if the filenames are the same on a case-insensitive system.
    toc = TOC(ELEMS1)
    toc.insert(1, ('EnCodIngs', '/usr/lib/python2.7/encodings.py', 'BINARY'))
    expected = list(ELEMS1)
    assert toc == expected
开发者ID:BillFly,项目名称:pyinstaller,代码行数:8,代码来源:test_TOC.py


注:本文中的PyInstaller.building.datastruct.TOC.insert方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。