本文整理匯總了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))