本文整理汇总了Python中models.Runs._generate_runs方法的典型用法代码示例。如果您正苦于以下问题:Python Runs._generate_runs方法的具体用法?Python Runs._generate_runs怎么用?Python Runs._generate_runs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.Runs
的用法示例。
在下文中一共展示了Runs._generate_runs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_generate_runs
# 需要导入模块: from models import Runs [as 别名]
# 或者: from models.Runs import _generate_runs [as 别名]
def test_generate_runs(self):
some_branch = Branch.create_if_possible('some-branch', 'Some Branch')
some_platform = Platform.create_if_possible('some-platform', 'Some Platform')
some_builder = Builder.get(Builder.create('some-builder', 'Some Builder'))
some_test = Test.update_or_insert('some-test', some_branch, some_platform)
builds, results = self._create_results(some_branch, some_platform, some_builder, 'some-test', [50.0, 51.0, 52.0, 49.0, 48.0])
last_i = 0
for i, (build, result) in enumerate(Runs._generate_runs(some_branch, some_platform, some_test)):
self.assertEqual(build.buildNumber, i)
self.assertEqual(build.revision, 100 + i)
self.assertEqual(result.name, 'some-test')
self.assertEqual(result.value, results[i].value)
last_i = i
self.assertTrue(last_i + 1, len(results))