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

Side by Side Diff: scripts/common/unittests/annotator_test.py

Issue 17635005: Make blink_trybot recipe work on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fix presubmit + move polyfill (retry) Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 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 """Unit tests for classes in annotator.py.""" 6 """Unit tests for classes in annotator.py."""
7 7
8 import cStringIO 8 import cStringIO
9 import json 9 import json
10 import os 10 import os
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 result = [ 278 result = [
279 '', 279 '',
280 '@@@SEED_STEP one@@@', 280 '@@@SEED_STEP one@@@',
281 '', 281 '',
282 '@@@SEED_STEP two@@@', 282 '@@@SEED_STEP two@@@',
283 '', 283 '',
284 '@@@STEP_CURSOR one@@@', 284 '@@@STEP_CURSOR one@@@',
285 '', 285 '',
286 '@@@STEP_STARTED@@@', 286 '@@@STEP_STARTED@@@',
287 "/usr/bin/python -c print 'hello!'", 287 sys.executable + " -c print 'hello!'",
288 ' allow_subannotations: False', 288 ' allow_subannotations: False',
289 ' always_run: False', 289 ' always_run: False',
290 ' build_failure: False', 290 ' build_failure: False',
291 ' cmd: [\'/usr/bin/python\', \'-c\', "print \'hello!\'"]', 291 ' cmd: [' + repr(sys.executable) + ', \'-c\', "print \'hello!\'"]',
292 ' cwd: None', 292 ' cwd: None',
293 ' env: None', 293 ' env: None',
294 ' followup_fn: None', 294 ' followup_fn: None',
295 ' name: one', 295 ' name: one',
296 ' seed_steps: None', 296 ' seed_steps: None',
297 ' skip: False', 297 ' skip: False',
298 '', 298 '',
299 'hello!', 299 'hello!',
300 '', 300 '',
301 '@@@STEP_CURSOR one@@@', 301 '@@@STEP_CURSOR one@@@',
302 '', 302 '',
303 '@@@STEP_CLOSED@@@', 303 '@@@STEP_CLOSED@@@',
304 '', 304 '',
305 '@@@STEP_CURSOR two@@@', 305 '@@@STEP_CURSOR two@@@',
306 '', 306 '',
307 '@@@STEP_STARTED@@@', 307 '@@@STEP_STARTED@@@',
308 "/usr/bin/python -c print 'yo!'", 308 sys.executable + " -c print 'yo!'",
309 ' allow_subannotations: False', 309 ' allow_subannotations: False',
310 ' always_run: False', 310 ' always_run: False',
311 ' build_failure: False', 311 ' build_failure: False',
312 ' cmd: [\'/usr/bin/python\', \'-c\', "print \'yo!\'"]', 312 ' cmd: [' + repr(sys.executable) + ', \'-c\', "print \'yo!\'"]',
313 ' cwd: None', 313 ' cwd: None',
314 ' env: None', 314 ' env: None',
315 ' followup_fn: None', 315 ' followup_fn: None',
316 ' name: two', 316 ' name: two',
317 ' seed_steps: None', 317 ' seed_steps: None',
318 ' skip: False', 318 ' skip: False',
319 '', 319 '',
320 'yo!', 320 'yo!',
321 '', 321 '',
322 '@@@STEP_CURSOR two@@@', 322 '@@@STEP_CURSOR two@@@',
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 'cmd': _synthesizeCmd(['print \'@@@SEED_STEP blah@@@\'']), 449 'cmd': _synthesizeCmd(['print \'@@@SEED_STEP blah@@@\'']),
450 'ignore_annotations': True 450 'ignore_annotations': True
451 },] 451 },]
452 ret = self._runAnnotator(cmdlist) 452 ret = self._runAnnotator(cmdlist)
453 self.assertFalse('@@@SEED_STEP blah@@@' in self.capture.text) 453 self.assertFalse('@@@SEED_STEP blah@@@' in self.capture.text)
454 self.assertEquals(ret, 0) 454 self.assertEquals(ret, 0)
455 455
456 456
457 if __name__ == '__main__': 457 if __name__ == '__main__':
458 unittest.main() 458 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698