本文整理汇总了Python中mrjob.conf.combine_path_lists函数的典型用法代码示例。如果您正苦于以下问题:Python combine_path_lists函数的具体用法?Python combine_path_lists怎么用?Python combine_path_lists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了combine_path_lists函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_globbing
def test_globbing(self):
foo_path = os.path.join(self.tmp_dir, "foo")
bar_path = os.path.join(self.tmp_dir, "bar")
open(foo_path, "w").close()
open(bar_path, "w").close()
# make sure that paths that don't match anything on the local
# filesystem are still preserved.
self.assertEqual(
combine_path_lists(
[os.path.join(self.tmp_dir, "*"), foo_path], [os.path.join(self.tmp_dir, "q*"), "s3://walrus/foo"], None
),
[bar_path, foo_path, foo_path, os.path.join(self.tmp_dir, "q*"), "s3://walrus/foo"],
)
开发者ID:nyccto,项目名称:mrjob,代码行数:14,代码来源:test_conf.py
示例2: test_globbing
def test_globbing(self):
foo_path = os.path.join(self.tmp_dir, 'foo')
bar_path = os.path.join(self.tmp_dir, 'bar')
open(foo_path, 'w').close()
open(bar_path, 'w').close()
# make sure that paths that don't match anything on the local
# filesystem are still preserved.
assert_equal(
combine_path_lists([os.path.join(self.tmp_dir, '*'),
foo_path],
[os.path.join(self.tmp_dir, 'q*'),
's3://walrus/foo'],
None),
[bar_path, foo_path, foo_path,
os.path.join(self.tmp_dir, 'q*'),
's3://walrus/foo'])
开发者ID:gimlids,项目名称:LTPM,代码行数:17,代码来源:conf_test.py
示例3: test_combine_path_lists
def test_combine_path_lists(self):
assert_equal(
combine_path_lists(['~/tmp'], [], ['/dev/null', '/tmp/$USER']),
['/home/foo/tmp', '/dev/null', '/tmp/foo'])
开发者ID:gimlids,项目名称:LTPM,代码行数:4,代码来源:conf_test.py
示例4: test_combine_path_lists_empty
def test_combine_path_lists_empty(self):
assert_equal(combine_path_lists(), [])
开发者ID:gimlids,项目名称:LTPM,代码行数:2,代码来源:conf_test.py
示例5: test_combine_path_lists_empty
def test_combine_path_lists_empty(self):
self.assertEqual(combine_path_lists(), [])
开发者ID:icio,项目名称:mrjob,代码行数:2,代码来源:test_conf.py
示例6: test_combine_path_lists
def test_combine_path_lists(self):
self.assertEqual(
combine_path_lists(["~/tmp"], [], ["/dev/null", "/tmp/$USER"]), ["/home/foo/tmp", "/dev/null", "/tmp/foo"]
)
开发者ID:nyccto,项目名称:mrjob,代码行数:4,代码来源:test_conf.py
示例7: test_combine_path_lists_on_strings
def test_combine_path_lists_on_strings(self):
self.assertEqual(
combine_path_lists('~/tmp', [], ['/dev/null', '/tmp/$USER']),
['/home/foo/tmp', '/dev/null', '/tmp/foo'])
开发者ID:Affirm,项目名称:mrjob,代码行数:4,代码来源:test_conf.py
注:本文中的mrjob.conf.combine_path_lists函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论