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

Unified Diff: tests/patch_test.py

Issue 8366042: Fix tests on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/subprocess2_test.py » ('j') | 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 2710a386458d9b2e7753da941ff58c5041c2d533..76778ea4526cd3dc5ffc1a1d56d7a95f93d5abf4 100755
--- a/tests/patch_test.py
+++ b/tests/patch_test.py
@@ -7,6 +7,7 @@
import logging
import os
+import posixpath
import sys
import unittest
@@ -153,12 +154,13 @@ class PatchTest(unittest.TestCase):
orig_name = patches.patches[4].filename
orig_source_name = patches.patches[4].source_filename or orig_name
patches.set_relpath(os.path.join('a', 'bb'))
- expected = [os.path.join('a', 'bb', x) for x in expected]
+ # Expect posixpath all the time.
+ expected = [posixpath.join('a', 'bb', x) for x in expected]
self.assertEquals(expected, patches.filenames)
# Make sure each header is updated accordingly.
header = []
- new_name = os.path.join('a', 'bb', orig_name)
- new_source_name = os.path.join('a', 'bb', orig_source_name)
+ new_name = posixpath.join('a', 'bb', orig_name)
+ new_source_name = posixpath.join('a', 'bb', orig_source_name)
for line in RAW.PATCH.splitlines(True):
if line.startswith('@@'):
break
« no previous file with comments | « no previous file | tests/subprocess2_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698