Home
last modified time | relevance | path

Searched refs:datetime (Results 1 – 25 of 274) sorted by relevance

1234567891011

/external/autotest/server/cros/
Drepair_utils_unittest.py7 import datetime, unittest
23 class MockDatetime(datetime.datetime):
50 self.datetime = datetime.datetime
51 datetime.datetime = MockDatetime
59 datetime.datetime = self.datetime
70 created_on=datetime.datetime(2012, 1, 1))
74 started_on=datetime.datetime(2012, 1, 1, 1))
78 created_on=datetime.datetime(2012, 1, 1))
82 started_on=datetime.datetime(2012, 1, 1, 2))
86 datetime.datetime.today().AndReturn(datetime.datetime(2012,1,1))
[all …]
/external/autotest/frontend/health/
Dcomplete_failures_unittest.py7 import datetime, unittest
25 class MockDatetime(datetime.datetime):
154 self.datetime = datetime.datetime
155 datetime.datetime = MockDatetime
161 datetime.datetime = self.datetime
177 started_time=self.datetime(2012, 1, 1))
182 started_time=self.datetime(2011, 1, 2))
185 datetime.datetime.today().AndReturn(self.datetime(2012, 1, 4))
204 started_time=self.datetime(2012, 1, 1))
209 started_time=self.datetime(2012, 1, 2))
[all …]
Dutils_unittest.py7 import datetime, unittest
69 started_time=datetime.datetime(2012, 1, 1))
74 started_time=datetime.datetime(2012, 1, 2))
79 self.assertEquals(results, {'test': datetime.datetime(2012, 1, 2)})
91 started_time=datetime.datetime(2012, 1, 1))
96 started_time=datetime.datetime(2012, 1, 1))
102 {'passing_test': datetime.datetime(2012, 1, 1)})
114 started_time=datetime.datetime(2012, 1, 1))
119 started_time=datetime.datetime(2012, 1, 2))
124 self.assertEquals(results, {'test1': datetime.datetime(2012, 1, 1),
[all …]
Dpassing_experimental_unittest.py7 import datetime, unittest
23 class MockDatetime(datetime.datetime):
68 self._datetime = datetime.datetime
69 datetime.datetime = MockDatetime
77 datetime.datetime = self._datetime
84 datetime.datetime.today().AndReturn(self._datetime(2013, 3, 20))
85 datetime.datetime.today().AndReturn(self._datetime(2013, 3, 20))
103 datetime.datetime.today().AndReturn(self._datetime(2013, 3, 20))
104 datetime.datetime.today().AndReturn(self._datetime(2013, 3, 20))
122 datetime.datetime.today().AndReturn(self._datetime(2013, 3, 20))
[all …]
Dcomplete_failures_functional_test.py13 import datetime, unittest
61 class MockDatetime(datetime.datetime):
81 self.datetime = datetime.datetime
82 datetime.datetime = MockDatetime
92 datetime.datetime = self.datetime
108 started_time=self.datetime(2012, 1, 1))
113 started_time=self.datetime(2012,1,1))
118 started_time=self.datetime(2012, 1, 20))
122 MockDatetime.today().AndReturn(self.datetime(2012, 1, 21))
123 MockDatetime.today().AndReturn(self.datetime(2012, 1, 21))
Dpassing_experimental_functional_test.py7 import datetime, subprocess, unittest
33 class MockDatetime(datetime.datetime):
54 self.datetime = datetime.datetime
55 datetime.datetime = MockDatetime
70 datetime.datetime = self.datetime
93 started_time=self.datetime(2012, 1, 20))
98 started_time=self.datetime(2012, 1, 20))
104 MockDatetime.today().AndReturn(self.datetime(2012, 1, 21))
105 MockDatetime.today().AndReturn(self.datetime(2012, 1, 21))
Dcomplete_failures.py8 import argparse, datetime, sys
72 cutoff_delta = datetime.timedelta(_DAYS_NOT_RUNNING_CUTOFF)
73 cutoff_date = datetime.datetime.today() - cutoff_delta
103 always_failed = {test: datetime.datetime.min for test in failures_names}
138 cutoff = (datetime.datetime.today() -
139 datetime.timedelta(_DAYS_TO_BE_FAILING_TOO_LONG))
/external/chromium-trace/catapult/dashboard/dashboard/
Demail_summary_test.py5 import datetime
38 anomaly_time = datetime.datetime.now()
58 anomaly_time = datetime.datetime.now() - datetime.timedelta(hours=18)
60 anomaly_time = datetime.datetime.now() - datetime.timedelta(hours=36)
73 anomaly_time = datetime.datetime.now() - datetime.timedelta(hours=18)
75 anomaly_time = datetime.datetime.now() - datetime.timedelta(hours=36)
88 anomaly_time = datetime.datetime.now() - datetime.timedelta(hours=18)
102 anomaly_time = datetime.datetime.now() - datetime.timedelta(hours=36)
117 anomaly_time = datetime.datetime.now() - datetime.timedelta(hours=18)
Dgraph_revisions_test.py5 import datetime
40 row.timestamp = datetime.datetime(2013, 8, 1)
54 datetime.datetime(2013, 8, 1))
77 ts1 = datetime.datetime(2013, 1, 1)
81 ts2 = datetime.datetime(2013, 1, 2)
85 ts3 = datetime.datetime(2013, 1, 3)
Dstats_test.py5 import datetime
102 timestamp=datetime.datetime(2013, 5, 1),
110 timestamp=datetime.datetime(2013, 6, 17),
118 timestamp=datetime.datetime(2013, 5, 11),
126 timestamp=datetime.datetime(2013, 5, 12),
132 timestamp=datetime.datetime(2013, 5, 12),
139 timestamp=datetime.datetime(2013, 5, 12),
146 timestamp=datetime.datetime(2013, 5, 12),
153 timestamp=datetime.datetime(2013, 5, 12),
160 timestamp=datetime.datetime(2013, 5, 15),
[all …]
Dauto_bisect_test.py5 import datetime
48 last_ran_timestamp=datetime.datetime.now() - datetime.timedelta(days=8),
58 last_ran_timestamp=datetime.datetime.now(),
68 last_ran_timestamp=datetime.datetime.now(),
75 now = datetime.datetime.now()
200 last_ran_timestamp=datetime.datetime.now(),
212 last_ran_timestamp=datetime.datetime.now() - datetime.timedelta(days=8),
223 last_ran_timestamp=datetime.datetime.now(),
Dmr_test.py5 import datetime
69 now = datetime.datetime.now()
70 deprecated_time = datetime.datetime.now() - datetime.timedelta(days=20)
99 last_b.timestamp = datetime.datetime.now() - datetime.timedelta(days=20)
119 now = datetime.datetime.now()
120 row_timestamp = now - datetime.timedelta(days=row_age_days)
/external/chromium-trace/catapult/perf_insights/perf_insights/
Dcorpus_query_unittest.py4 import datetime
57 self.assertTrue(isinstance(f.b.constant, datetime.datetime))
58 at = datetime.datetime(2015, 1, 2, 3, 4, 5, 678000)
61 before = datetime.datetime(2014, 12, 1, 2, 3, 4, 0)
64 after = datetime.datetime(2015, 2, 3, 4, 5, 6, 789000)
93 just_before_start = datetime.datetime(2014, 12, 31, 23, 59, 59, 99999)
94 start = datetime.datetime(2015, 1, 1, 0, 0, 0, 0)
95 end = datetime.datetime(2015, 2, 1, 0, 0, 0, 0)
96 just_before_end = datetime.datetime(2015, 1, 31, 23, 59, 59, 999999)
97 middle = datetime.datetime(2015, 1, 15, 0, 0, 0, 0)
[all …]
/external/chromium-trace/catapult/third_party/webapp2/tests/
Dextras_i18n_test.py2 import datetime
69 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
77 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
116 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
124 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
136 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
141 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
151 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
160 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
165 value = datetime.datetime(2009, 11, 10, 16, 36, 05)
[all …]
/external/chromium-trace/catapult/third_party/gsutil/third_party/boto/tests/unit/cloudformation/
Dtest_stack.py2 import datetime
162 datetime.datetime(2013, 1, 10, 5, 4, 56, 102342)
174 datetime.datetime(2010, 7, 27, 22, 27, 28)
179 datetime.datetime(2010, 7, 27, 22, 28, 28, 123456)
191 datetime.datetime(2011, 5, 23, 15, 47, 44)
196 datetime.datetime(2011, 3, 5, 19, 57, 58, 161616)
201 datetime.datetime(2011, 3, 10, 16, 20, 51, 575757)
213 datetime.datetime(2011, 6, 21, 20, 15, 58)
218 datetime.datetime(2011, 6, 21, 20, 25, 57, 875643)
/external/autotest/client/tests/wb_kupdate/
Dwb_kupdate_unittest.py4 import datetime
30 start_time=datetime.datetime.now(),
35 start_time=datetime.datetime.now(),
37 _now=datetime.datetime.now() + datetime.timedelta(seconds=60)))
60 self._wbkupdate_obj._wait_until_data_flushed(datetime.datetime.now(),
87 start_time=datetime.datetime.now(),
/external/chromium-trace/catapult/third_party/gsutil/third_party/protorpc/protorpc/
Dmessage_types.py26 import datetime
60 type = datetime.datetime
83 return datetime.datetime.utcfromtimestamp(message.milliseconds / 1000.0)
92 return datetime.datetime.fromtimestamp(milliseconds / 1000.0,
101 local_epoch = datetime.datetime.utcfromtimestamp(0)
105 local_epoch = datetime.datetime.fromtimestamp(-time_zone_offset,
Dmessage_types_test.py23 import datetime
43 message = field.value_to_message(datetime.datetime(2033, 2, 4, 11, 22, 10))
58 datetime.datetime(2033, 2, 4, 11, 22, 10, tzinfo=time_zone))
67 self.assertEqual(datetime.datetime(2033, 2, 4, 11, 6, 40),
83 self.assertEqual(datetime.datetime(2033, 2, 4, 11, 6, 40, tzinfo=time_zone),
/external/autotest/client/common_lib/
Dtime_utils.py7 import datetime
31 return datetime.datetime.strptime(time_string, TIME_FMT)
33 return datetime.datetime.strptime(time_string, TIME_FMT_MICRO)
63 return datetime.datetime.fromtimestamp(
83 if isinstance(value, datetime.datetime):
/external/chromium-trace/catapult/third_party/gsutil/third_party/gcs-oauth2-boto-plugin/gcs_oauth2_boto_plugin/
Dtest_oauth2_client.py19 import datetime
97 + datetime.timedelta(seconds=length_in_seconds))
118 self.start_time = datetime.datetime(2011, 3, 1, 11, 25, 13, 300826)
140 self.assertEquals(self.start_time + datetime.timedelta(minutes=60),
146 self.start_time + datetime.timedelta(minutes=55))
158 self.start_time + datetime.timedelta(minutes=55, seconds=1))
165 self.mock_datetime.mock_now + datetime.timedelta(minutes=60),
175 start = datetime.datetime(2011, 3, 1, 11, 25, 13, 300826)
176 expiry = start + datetime.timedelta(minutes=60)
183 mock_datetime.mock_now = start + datetime.timedelta(minutes=54)
[all …]
/external/chromium-trace/catapult/third_party/webapp2/webapp2_extras/
Di18n.py13 import datetime
299 def to_local_timezone(self, datetime): argument
307 if datetime.tzinfo is None:
308 datetime = datetime.replace(tzinfo=pytz.UTC)
310 return self.tzinfo.normalize(datetime.astimezone(self.tzinfo))
312 def to_utc(self, datetime): argument
320 if datetime.tzinfo is None:
321 datetime = self.tzinfo.localize(datetime)
323 return datetime.astimezone(pytz.UTC).replace(tzinfo=None)
371 if rebase and isinstance(date, datetime.datetime):
[all …]
/external/autotest/site_utils/suite_scheduler/
Dtimed_event.py5 import datetime, logging
43 return datetime.datetime.now()
67 since_date = self._deadline - datetime.timedelta(days=days_ago)
102 now_hour = datetime.datetime(now.year, now.month, now.day, now.hour)
104 deadline = now_hour + datetime.timedelta(hours=extra_hour)
114 self._deadline = self._deadline + datetime.timedelta(hours=1)
176 this_week_deadline = datetime.datetime.combine(
177 now, datetime.time(event_time))
181 deadline = this_week_deadline + datetime.timedelta(days=1)
204 self._deadline = self._deadline + datetime.timedelta(days=1)
/external/chromium-trace/catapult/third_party/gsutil/third_party/boto/boto/ec2/autoscale/
Dscheduled.py23 from datetime import datetime
63 self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')
65 self.time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')
68 self.start_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')
70 self.start_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')
73 self.end_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')
75 self.end_time = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ')
/external/autotest/site_utils/rpm_control_system/
Drpm_logging_config.py4 import datetime
26 _suspend_start_time = datetime.datetime.now()
35 self._suspend_start_time = datetime.datetime.now()
52 if datetime.datetime.now() < (self._suspend_start_time +
53 datetime.timedelta(hours=self._suspend_time_hrs)):
/external/chromium-trace/catapult/perf_insights/perf_insights/endpoints/cloud_mapper/
Dtask.py4 import datetime
98 datetime.datetime.now() + datetime.timedelta(
126 timeout = datetime.datetime.strptime(
146 if not mappers_done and datetime.datetime.now() < timeout:
203 datetime.datetime.now() + datetime.timedelta(
239 timeout = datetime.datetime.strptime(
241 if datetime.datetime.now() > timeout:

1234567891011