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

Unified Diff: tests/rietveld_test.py

Issue 8539016: Fix deleted empty files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 1 month 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 | « testing_support/patches_data.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/rietveld_test.py
diff --git a/tests/rietveld_test.py b/tests/rietveld_test.py
index 5f6bb0480dadb30299c5e3825f90be728bd84bf3..fa13945e91656eb570dc9076d9b582ca7dc5969f 100755
--- a/tests/rietveld_test.py
+++ b/tests/rietveld_test.py
@@ -188,7 +188,23 @@ class RietveldTest(unittest.TestCase):
]
patches = self.rietveld.get_patch(123, 456)
self.assertEquals(1, len(patches.patches))
- self._check_patch(patches.patches[0], name, None, is_delete=True)
+ self._check_patch(patches.patches[0], name, RAW.DELETE, is_delete=True)
+
+ def test_delete_empty(self):
+ name = 'tests/__init__.py'
+ self.requests = [
+ ('/api/123/456', _api({name: _file('D')})),
+ ('/download/issue123_456_789.diff', GIT.DELETE_EMPTY),
+ ]
+ patches = self.rietveld.get_patch(123, 456)
+ self.assertEquals(1, len(patches.patches))
+ self._check_patch(
+ patches.patches[0],
+ name,
+ GIT.DELETE_EMPTY,
+ is_delete=True,
+ is_git_diff=True,
+ patchlevel=1)
def test_m_plus(self):
properties = '\nAdded: svn:eol-style\n + LF\n'
@@ -348,5 +364,6 @@ class RietveldTest(unittest.TestCase):
if __name__ == '__main__':
- logging.basicConfig(level=logging.ERROR)
+ logging.basicConfig(level=[
+ logging.ERROR, logging.INFO, logging.DEBUG][min(2, sys.argv.count('-v'))])
unittest.main()
« no previous file with comments | « testing_support/patches_data.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698