| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import contextlib | 6 import contextlib |
| 7 import json | 7 import json |
| 8 import os | 8 import os |
| 9 import tempfile | 9 import tempfile |
| 10 import shutil | 10 import shutil |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 def getProperty(self, _name): | 43 def getProperty(self, _name): |
| 44 return 1427929423.0 | 44 return 1427929423.0 |
| 45 | 45 |
| 46 def getProperties(self): | 46 def getProperties(self): |
| 47 return Properties() | 47 return Properties() |
| 48 | 48 |
| 49 def getSourceStamp(self): | 49 def getSourceStamp(self): |
| 50 return SourceStamp() | 50 return SourceStamp() |
| 51 | 51 |
| 52 def getSteps(self): |
| 53 return [] |
| 54 |
| 52 def getTimes(self): | 55 def getTimes(self): |
| 53 return 5000, 6000 | 56 return 5000, 6000 |
| 54 | 57 |
| 55 | 58 |
| 56 class Step(object): | 59 class Step(object): |
| 57 step_number = 8 | 60 step_number = 8 |
| 58 def getName(self): | 61 def getName(self): |
| 59 return 'reticulating_splines' | 62 return 'reticulating_splines' |
| 60 | 63 |
| 61 def getTimes(self): | 64 def getTimes(self): |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 self.assertTrue(os.path.exists(logger._event_logfile)) | 179 self.assertTrue(os.path.exists(logger._event_logfile)) |
| 177 # Ensure we added valid json | 180 # Ensure we added valid json |
| 178 with open(logger._event_logfile, 'r') as f: | 181 with open(logger._event_logfile, 'r') as f: |
| 179 content = f.read() | 182 content = f.read() |
| 180 self.assertTrue(content) | 183 self.assertTrue(content) |
| 181 json.loads(content) | 184 json.loads(content) |
| 182 | 185 |
| 183 | 186 |
| 184 if __name__ == '__main__': | 187 if __name__ == '__main__': |
| 185 unittest.main() | 188 unittest.main() |
| OLD | NEW |