本文整理汇总了Python中buildbot.steps.source.Source.computeRepositoryURL方法的典型用法代码示例。如果您正苦于以下问题:Python Source.computeRepositoryURL方法的具体用法?Python Source.computeRepositoryURL怎么用?Python Source.computeRepositoryURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类buildbot.steps.source.Source
的用法示例。
在下文中一共展示了Source.computeRepositoryURL方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_dict
# 需要导入模块: from buildbot.steps.source import Source [as 别名]
# 或者: from buildbot.steps.source.Source import computeRepositoryURL [as 别名]
def test_dict(self):
s = Source()
s.build = Build()
dict = {}
dict['test'] = "ssh://server/testrepository"
self.assertEquals(s.computeRepositoryURL(dict), "ssh://server/testrepository")
示例2: test_callable
# 需要导入模块: from buildbot.steps.source import Source [as 别名]
# 或者: from buildbot.steps.source.Source import computeRepositoryURL [as 别名]
def test_callable(self):
s = Source()
s.build = Build()
func = lambda x: x[::-1]
self.assertEquals(s.computeRepositoryURL(func), "tset")
示例3: test_format_string
# 需要导入模块: from buildbot.steps.source import Source [as 别名]
# 或者: from buildbot.steps.source.Source import computeRepositoryURL [as 别名]
def test_format_string(self):
s = Source()
s.build = Build()
self.assertEquals(s.computeRepositoryURL("http://server/%s"), "http://server/test")
示例4: test_backward_compatibility
# 需要导入模块: from buildbot.steps.source import Source [as 别名]
# 或者: from buildbot.steps.source.Source import computeRepositoryURL [as 别名]
def test_backward_compatibility(self):
s = Source()
s.build = Build()
self.assertEqual(s.computeRepositoryURL("repourl"), "repourl")
示例5: test_callable_render
# 需要导入模块: from buildbot.steps.source import Source [as 别名]
# 或者: from buildbot.steps.source.Source import computeRepositoryURL [as 别名]
def test_callable_render(self):
s = Source()
s.build = Build()
func = lambda x: WithProperties(x+"%(foo)s")
self.assertEquals(s.computeRepositoryURL(func), "testbar")
示例6: test_dict_render
# 需要导入模块: from buildbot.steps.source import Source [as 别名]
# 或者: from buildbot.steps.source.Source import computeRepositoryURL [as 别名]
def test_dict_render(self):
s = Source()
s.build = Build()
d = dict(test=WithProperties("repourl%(foo)s"))
self.assertEquals(s.computeRepositoryURL(d), "repourlbar")
示例7: test_backward_compatibility_render
# 需要导入模块: from buildbot.steps.source import Source [as 别名]
# 或者: from buildbot.steps.source.Source import computeRepositoryURL [as 别名]
def test_backward_compatibility_render(self):
s = Source()
s.build = Build()
self.assertEquals(s.computeRepositoryURL(WithProperties("repourl%(foo)s")), "repourlbar")