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

Unified Diff: client/tests/run_isolated_smoke_test.py

Issue 2853413002: Add unit test to clean_caches() (Closed)
Patch Set: os.path.relpath Created 3 years, 7 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 | « client/tests/isolateserver_test.py ('k') | client/tests/run_isolated_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/run_isolated_smoke_test.py
diff --git a/client/tests/run_isolated_smoke_test.py b/client/tests/run_isolated_smoke_test.py
index 2d2316ce48882a4b553bcf8474164713a0bab481..92687387fac3714f32c50bbe6ba3059655a261d1 100755
--- a/client/tests/run_isolated_smoke_test.py
+++ b/client/tests/run_isolated_smoke_test.py
@@ -241,7 +241,7 @@ def tree_modes(root):
"""
out = {}
offset = len(root.rstrip('/\\')) + 1
- out['.'] = oct(os.stat(root).st_mode)
+ out[u'.'] = oct(os.stat(root).st_mode)
for dirpath, dirnames, filenames in os.walk(root):
for filename in filenames:
p = os.path.join(dirpath, filename)
@@ -443,13 +443,13 @@ class RunIsolatedTest(unittest.TestCase):
_out, _err, returncode = self._run(self._cmd_args(isolated_hash))
self.assertEqual(0, returncode)
expected = {
- '.': (040700, 040700, 040777),
- 'state.json': (0100600, 0100600, 0100666),
+ u'.': (040700, 040700, 040777),
+ u'state.json': (0100600, 0100600, 0100666),
# The reason for 0100666 on Windows is that the file node had to be
# modified to delete the hardlinked node. The read only bit is reset on
# load.
- file1_hash: (0100400, 0100400, 0100666),
- isolated_hash: (0100400, 0100400, 0100444),
+ unicode(file1_hash): (0100400, 0100400, 0100666),
+ unicode(isolated_hash): (0100400, 0100400, 0100444),
}
self.assertTreeModes(self.cache, expected)
@@ -467,7 +467,7 @@ class RunIsolatedTest(unittest.TestCase):
out, err, returncode = self._run(self._cmd_args(isolated_hash))
self.assertEqual(0, returncode, (out, err, returncode))
expected = {
- '.': (040700, 040700, 040777),
+ u'.': (040700, 040700, 040777),
u'state.json': (0100600, 0100600, 0100666),
unicode(file1_hash): (0100400, 0100400, 0100666),
unicode(isolated_hash): (0100400, 0100400, 0100444),
« no previous file with comments | « client/tests/isolateserver_test.py ('k') | client/tests/run_isolated_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698