Esempio n. 1
0
    def test_tests_with_full_runtime_history_should_override_timeouts(self):
        test_list = [f"test_{i}" for i in range(10)]
        runtime_list = [
            MagicMock(spec_set=TestRuntime, test_name=test, runtime=3.14)
            for test in test_list
        ]
        sub_suite = under_test.SubSuite(test_list, 0, runtime_list)

        assert sub_suite.should_overwrite_timeout()
Esempio n. 2
0
def build_mock_sub_suite(index, test_list):
    return under_test.SubSuite(
        index=index,
        suite_name="suite_name",
        test_list=test_list,
        tests_with_runtime_info=0,
        max_test_runtime=0,
        historic_runtime=0,
        task_overhead=0,
    )
Esempio n. 3
0
def build_mock_sub_suite(index, test_list):
    return under_test.SubSuite(
        test_list=test_list,
        task_overhead=0,
    )