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

Unified Diff: tests/isolate_test.py

Issue 22902007: Switch trace_inputs.py and isolate.py to subcommand.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Now works Created 7 years, 4 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
Index: tests/isolate_test.py
diff --git a/tests/isolate_test.py b/tests/isolate_test.py
index 429e3922ab607cd8f67cd8c6906e00ea3d4186b6..7d3c09abf9400adf242850a3b79a39384ae64358 100755
--- a/tests/isolate_test.py
+++ b/tests/isolate_test.py
@@ -1562,16 +1562,6 @@ class IsolateLoad(IsolateBase):
class IsolateCommand(IsolateBase):
- def setUp(self):
- super(IsolateCommand, self).setUp()
- self._old_get_command_handler = isolate.trace_inputs.get_command_handler
- isolate.trace_inputs.get_command_handler = (
- lambda name: getattr(isolate, 'CMD%s' % name, None))
-
- def tearDown(self):
- isolate.trace_inputs.get_command_handler = self._old_get_command_handler
- super(IsolateCommand, self).tearDown()
-
def test_CMDrewrite(self):
isolate_file = os.path.join(self.cwd, 'x.isolate')
data = (
@@ -1582,7 +1572,8 @@ class IsolateCommand(IsolateBase):
with open(isolate_file, 'wb') as f:
f.write('\n'.join(data))
- self.assertEqual(0, isolate.CMDrewrite(['-i', isolate_file]))
+ cmd = ['-i', isolate_file]
+ self.assertEqual(0, isolate.CMDrewrite(isolate.OptionParserIsolate(), cmd))
with open(isolate_file, 'rb') as f:
actual = f.read()
@@ -1602,7 +1593,7 @@ class IsolateCommand(IsolateBase):
'-V', 'chromeos', '0',
'-s', isolated_file,
]
- self.assertEqual(0, isolate.CMDcheck(cmd))
+ self.assertEqual(0, isolate.CMDcheck(isolate.OptionParserIsolate(), cmd))
with open(isolated_file, 'rb') as f:
actual = json.load(f)
mapped = [

Powered by Google App Engine
This is Rietveld 408576698