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

Unified Diff: tests/gclient_test.py

Issue 1627009: Workaround output variance in pprint.pformat. (Closed)
Patch Set: Created 10 years, 8 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 | « gclient.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_test.py
diff --git a/tests/gclient_test.py b/tests/gclient_test.py
index 8a1fcf58f9c929addce1305ccd239cdd7a1c146f..4ca185aed4795c0e432eccc5f0aeda4712859d81 100755
--- a/tests/gclient_test.py
+++ b/tests/gclient_test.py
@@ -6,7 +6,7 @@
"""Unit tests for gclient.py."""
# Fixes include path.
-from super_mox import mox, IsOneOf, SuperMoxTestBase
+from super_mox import mox, SuperMoxTestBase
import gclient
@@ -364,14 +364,10 @@ class GClientClassTestCase(GclientTestCase):
) % (solution_name, self.url)
# pprint.pformat() is non-deterministic in this case!!
- entries_content1 = (
+ entries_content = (
"entries = \\\n"
"{ '%s': '%s'}\n"
) % (solution_name, self.url)
- entries_content2 = (
- "entries = \\\n"
- "{'%s': '%s'}\n"
- ) % (solution_name, self.url)
options = self.Options()
@@ -398,7 +394,7 @@ class GClientClassTestCase(GclientTestCase):
# file.
gclient.gclient_utils.FileWrite(
gclient.os.path.join(self.root_dir, options.entries_filename),
- IsOneOf((entries_content1, entries_content2)))
+ entries_content)
self.mox.ReplayAll()
client = self._gclient_gclient(self.root_dir, options)
@@ -657,15 +653,10 @@ class GClientClassTestCase(GclientTestCase):
}, ]""" % (name, self.url)
# pprint.pformat() is non-deterministic in this case!!
- entries_content1 = (
+ entries_content = (
"entries = \\\n"
"{ '%s': '%s'}\n"
) % (name, self.url)
- entries_content2 = (
- "entries = \\\n"
- "{'%s': '%s'}\n"
- ) % (name, self.url)
-
options = self.Options()
gclient.os.path.exists(gclient.os.path.join(self.root_dir, name, '.git')
@@ -681,7 +672,7 @@ class GClientClassTestCase(GclientTestCase):
).AndReturn("Boo = 'a'")
gclient.gclient_utils.FileWrite(
gclient.os.path.join(self.root_dir, options.entries_filename),
- IsOneOf((entries_content1, entries_content2)))
+ entries_content)
self.mox.ReplayAll()
client = self._gclient_gclient(self.root_dir, options)
@@ -1065,7 +1056,7 @@ deps = {
self.args + ["DEPS"], [])
gclient.gclient_utils.FileWrite(
gclient.os.path.join(self.root_dir, options.entries_filename),
- "entries = \\\n{'%s': '%s'}\n" % (name, self.url))
+ "entries = \\\n{ '%s': '%s'}\n" % (name, self.url))
self.mox.ReplayAll()
client = self._gclient_gclient(self.root_dir, options)
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698