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

Side by Side Diff: Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py

Issue 663023008: Remove deprecated and unused run_and_throw_if_fail from webkitpy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/common/system/executive.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2009 Google Inc. All rights reserved. 1 # Copyright (C) 2009 Google Inc. All rights reserved.
2 # Copyright (C) 2009 Apple Inc. All rights reserved. 2 # Copyright (C) 2009 Apple Inc. All rights reserved.
3 # Copyright (C) 2011 Daniel Bates (dbates@intudata.com). All rights reserved. 3 # Copyright (C) 2011 Daniel Bates (dbates@intudata.com). All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 def _remove(self, path): 87 def _remove(self, path):
88 self.fs.remove(path) 88 self.fs.remove(path)
89 89
90 def _rmtree(self, path): 90 def _rmtree(self, path):
91 self.fs.rmtree(path) 91 self.fs.rmtree(path)
92 92
93 def _run(self, *args, **kwargs): 93 def _run(self, *args, **kwargs):
94 return self.executive.run_command(*args, **kwargs) 94 return self.executive.run_command(*args, **kwargs)
95 95
96 def _run_silent(self, args, **kwargs): 96 def _run_silent(self, args, **kwargs):
97 self.executive.run_and_throw_if_fail(args, quiet=True, **kwargs) 97 self.executive.run_command(args, **kwargs)
98 98
99 def _write_text_file(self, path, contents): 99 def _write_text_file(self, path, contents):
100 self.fs.write_text_file(path, contents) 100 self.fs.write_text_file(path, contents)
101 101
102 def _write_binary_file(self, path, contents): 102 def _write_binary_file(self, path, contents):
103 self.fs.write_binary_file(path, contents) 103 self.fs.write_binary_file(path, contents)
104 104
105 def _make_diff(self, command, *args): 105 def _make_diff(self, command, *args):
106 # We use this wrapper to disable output decoding. diffs should be treate d as 106 # We use this wrapper to disable output decoding. diffs should be treate d as
107 # binary files since they may include text files of multiple differnet e ncodings. 107 # binary files since they may include text files of multiple differnet e ncodings.
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 scm = self.make_scm() 696 scm = self.make_scm()
697 scm.find_checkout_root = lambda path: '' 697 scm.find_checkout_root = lambda path: ''
698 scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000' 698 scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000'
699 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T08:05:49Z') 699 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T08:05:49Z')
700 700
701 scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130' 701 scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130'
702 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-07T23:32:03Z') 702 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-07T23:32:03Z')
703 703
704 scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800' 704 scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800'
705 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T09:55:21Z') 705 self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013- 02-08T09:55:21Z')
OLDNEW
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/common/system/executive.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698