本文整理汇总了Python中mozpack.copier.FileRegistry._partial_paths方法的典型用法代码示例。如果您正苦于以下问题:Python FileRegistry._partial_paths方法的具体用法?Python FileRegistry._partial_paths怎么用?Python FileRegistry._partial_paths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mozpack.copier.FileRegistry
的用法示例。
在下文中一共展示了FileRegistry._partial_paths方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_partial_paths
# 需要导入模块: from mozpack.copier import FileRegistry [as 别名]
# 或者: from mozpack.copier.FileRegistry import _partial_paths [as 别名]
def test_partial_paths(self):
cases = {
'foo/bar/baz/zot': ['foo/bar/baz', 'foo/bar', 'foo'],
'foo/bar': ['foo'],
'bar': [],
}
reg = FileRegistry()
for path, parts in cases.iteritems():
self.assertEqual(reg._partial_paths(path), parts)
示例2: test_partial_paths
# 需要导入模块: from mozpack.copier import FileRegistry [as 别名]
# 或者: from mozpack.copier.FileRegistry import _partial_paths [as 别名]
def test_partial_paths(self):
cases = {"foo/bar/baz/zot": ["foo/bar/baz", "foo/bar", "foo"], "foo/bar": ["foo"], "bar": []}
reg = FileRegistry()
for path, parts in cases.iteritems():
self.assertEqual(reg._partial_paths(path), parts)