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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/git_unittest.py

Issue 2691343007: Fix assert statement in Git.unstaged_changes. (Closed)
Patch Set: Created 3 years, 10 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 | « third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/git.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import unittest 5 import unittest
6 6
7 from webkitpy.common.system.executive import Executive, ScriptError 7 from webkitpy.common.system.executive import Executive, ScriptError
8 from webkitpy.common.system.executive_mock import MockExecutive 8 from webkitpy.common.system.executive_mock import MockExecutive
9 from webkitpy.common.system.filesystem import FileSystem 9 from webkitpy.common.system.filesystem import FileSystem
10 from webkitpy.common.system.filesystem_mock import MockFileSystem 10 from webkitpy.common.system.filesystem_mock import MockFileSystem
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 def test_timestamp_of_revision_pacific_timezone(self): 225 def test_timestamp_of_revision_pacific_timezone(self):
226 self._assert_timestamp_of_revision('Date: 2013-02-08 01:55:21 -0800', '2 013-02-08T09:55:21Z') 226 self._assert_timestamp_of_revision('Date: 2013-02-08 01:55:21 -0800', '2 013-02-08T09:55:21Z')
227 227
228 def test_unstaged_files(self): 228 def test_unstaged_files(self):
229 git = self.make_git() 229 git = self.make_git()
230 status_lines = [ 230 status_lines = [
231 ' M d/modified.txt', 231 ' M d/modified.txt',
232 ' D d/deleted.txt', 232 ' D d/deleted.txt',
233 '?? d/untracked.txt', 233 '?? d/untracked.txt',
234 '?? a',
234 'D d/deleted.txt', 235 'D d/deleted.txt',
235 'M d/modified-staged.txt', 236 'M d/modified-staged.txt',
236 'A d/added-staged.txt', 237 'A d/added-staged.txt',
237 ] 238 ]
238 # pylint: disable=protected-access 239 # pylint: disable=protected-access
239 git._run_git = lambda args: '\x00'.join(status_lines) + '\x00' 240 git._run_git = lambda args: '\x00'.join(status_lines) + '\x00'
240 self.assertEqual( 241 self.assertEqual(
241 git.unstaged_changes(), 242 git.unstaged_changes(),
242 { 243 {
243 'd/modified.txt': 'M', 244 'd/modified.txt': 'M',
244 'd/deleted.txt': 'D', 245 'd/deleted.txt': 'D',
245 'd/untracked.txt': '?', 246 'd/untracked.txt': '?',
247 'a': '?',
246 }) 248 })
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/git.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698