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

Unified Diff: tests/patch_test.py

Issue 7847005: Add automatic is_new=True on git copy or rename. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « patch.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/patch_test.py
diff --git a/tests/patch_test.py b/tests/patch_test.py
index 5f6562a00b85363c538960c2e782a73a35afe2c8..db621ea51f88378eaedb17b37ed0587dcde15d3f 100755
--- a/tests/patch_test.py
+++ b/tests/patch_test.py
@@ -459,7 +459,7 @@ class PatchTest(unittest.TestCase):
p = patch.FilePatchDiff('tools/run_local_server.sh', GIT_RENAME, [])
self._check_patch(p, 'tools/run_local_server.sh', GIT_RENAME,
is_git_diff=True, patchlevel=1,
- source_filename='tools/run_local_server.PY')
+ source_filename='tools/run_local_server.PY', is_new=True)
def testGitRenamePartial(self):
p = patch.FilePatchDiff(
@@ -467,12 +467,12 @@ class PatchTest(unittest.TestCase):
self._check_patch(
p, 'chromeos/views/webui_menu_widget.h', GIT_RENAME_PARTIAL,
source_filename='chromeos/views/DOMui_menu_widget.h', is_git_diff=True,
- patchlevel=1)
+ patchlevel=1, is_new=True)
def testGitCopy(self):
p = patch.FilePatchDiff('pp', GIT_COPY, [])
self._check_patch(p, 'pp', GIT_COPY, is_git_diff=True, patchlevel=1,
- source_filename='PRESUBMIT.py')
+ source_filename='PRESUBMIT.py', is_new=True)
def testOnlyHeader(self):
diff = '--- file_a\n+++ file_a\n'
@@ -503,7 +503,7 @@ class PatchTest(unittest.TestCase):
diff = '--- file_a\n+++ file_b\n'
p = patch.FilePatchDiff('file_b', diff, [])
# Should it be marked as new?
- self._check_patch(p, 'file_b', diff, source_filename='file_a')
+ self._check_patch(p, 'file_b', diff, source_filename='file_a', is_new=True)
def testGitCopyPartial(self):
diff = (
@@ -523,7 +523,8 @@ class PatchTest(unittest.TestCase):
p = patch.FilePatchDiff('wtf2', diff, [])
# Should it be marked as new?
self._check_patch(
- p, 'wtf2', diff, source_filename='wtf', is_git_diff=True, patchlevel=1)
+ p, 'wtf2', diff, source_filename='wtf', is_git_diff=True, patchlevel=1,
+ is_new=True)
def testGitExe(self):
diff = (
« no previous file with comments | « patch.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698