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

Unified Diff: tests/patch_test.py

Issue 9387024: Fix unicode upgrade of patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 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 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 671e5c92579fe035bd619662162cc32c14cf0ad9..68cda901d527668bf069a308117d26686f86f17b 100755
--- a/tests/patch_test.py
+++ b/tests/patch_test.py
@@ -275,6 +275,12 @@ class PatchTest(unittest.TestCase):
p, 'file_b', RAW.MINIMAL_RENAME, source_filename='file_a', is_new=True,
nb_hunks=0)
+ def testUnicodeFilenameGet(self):
+ p = patch.FilePatchDiff(u'file_b', RAW.MINIMAL_RENAME, [])
cmp 2012/02/14 18:11:59 This string (u'file_b') can be both encoded and de
+ self.assertTrue(isinstance(p.get(False), str))
+ p.set_relpath('foo')
+ self.assertTrue(isinstance(p.get(False), str))
+
def testGitCopyPartial(self):
p = patch.FilePatchDiff('wtf2', GIT.COPY_PARTIAL, [])
self._check_patch(
« 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