本文整理汇总了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
示例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
示例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]
示例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
示例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
示例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
示例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