Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Unified Diff: appengine/findit/waterfall/test/process_base_swarming_task_result_pipeline_test.py

Issue 2130543004: Waterfall components of regression range finder. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: added another init whoooo Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/waterfall/test/process_base_swarming_task_result_pipeline_test.py
diff --git a/appengine/findit/waterfall/test/process_base_swarming_task_result_pipeline_test.py b/appengine/findit/waterfall/test/process_base_swarming_task_result_pipeline_test.py
new file mode 100644
index 0000000000000000000000000000000000000000..5435ec42c75c422fafbe45add85a15f219264ce3
--- /dev/null
+++ b/appengine/findit/waterfall/test/process_base_swarming_task_result_pipeline_test.py
@@ -0,0 +1,31 @@
+import datetime
+
+from waterfall.test import wf_testcase
+from waterfall.process_base_swarming_task_result_pipeline import (
+ ProcessBaseSwarmingTaskResultPipeline)
+
+class ProcessBaseSwarmingTaskResultPipelineTest(wf_testcase.WaterfallTestCase):
+ def setUp(self):
+ super(ProcessBaseSwarmingTaskResultPipelineTest, self).setUp()
+ self.pipeline = ProcessBaseSwarmingTaskResultPipeline()
+ self.master_name = 'm'
+ self.builder_name = 'b'
+ self.build_number = 121
+ self.step_name = 'abc_tests on platform'
+ self.test_name = 'test'
+
+ def testConvertDateTime(self):
+ fmt = '%Y-%m-%dT%H:%M:%S.%f'
+ time_string = '2016-02-10T18:32:06.538220'
+ test_time = self.pipeline._ConvertDateTime(time_string)
+ time = datetime.datetime.strptime(time_string, fmt)
+ self.assertEqual(test_time, time)
+
+ def testConvertDateTimeNone(self):
+ time_string = ''
+ test_time = self.pipeline._ConvertDateTime(time_string)
+ self.assertIsNone(test_time)
+
+ def testConvertDateTimefailure(self):
+ with self.assertRaises(ValueError):
+ self.pipeline._ConvertDateTime('abc')

Powered by Google App Engine
This is Rietveld 408576698