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

Unified Diff: third_party/closure_compiler/compiler_customization_test.py

Issue 476453002: Python readability review for dbeam@. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove space Created 5 years, 9 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 | « third_party/closure_compiler/compile_js.gypi ('k') | third_party/closure_compiler/processor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/compiler_customization_test.py
diff --git a/third_party/closure_compiler/compiler_customization_test.py b/third_party/closure_compiler/compiler_customization_test.py
index 950059c3f0f99bd2de8d734f6e26c5565231b43a..ead5b2e40741f580607fdbaa44a2becf7807392e 100755
--- a/third_party/closure_compiler/compiler_customization_test.py
+++ b/third_party/closure_compiler/compiler_customization_test.py
@@ -36,18 +36,17 @@ class CompilerCustomizationTest(unittest.TestCase):
return self._checker.check(file_path)
def _runCheckerTestExpectError(self, source_code, expected_error):
- _, output = self._runChecker(source_code)
+ _, stderr = self._runChecker(source_code)
- self.assertTrue(expected_error in output,
+ self.assertTrue(expected_error in stderr,
msg="Expected chunk: \n%s\n\nOutput:\n%s\n" % (
- expected_error, output))
+ expected_error, stderr))
def _runCheckerTestExpectSuccess(self, source_code):
- return_code, output = self._runChecker(source_code)
+ found_errors, stderr = self._runChecker(source_code)
- self.assertTrue(return_code == 0,
- msg="Expected success, got return code %d\n\nOutput:\n%s\n" % (
- return_code, output))
+ self.assertFalse(found_errors,
+ msg="Expected success, but got failure\n\nOutput:\n%s\n" % stderr)
def testGetInstance(self):
self._runCheckerTestExpectError("""
« no previous file with comments | « third_party/closure_compiler/compile_js.gypi ('k') | third_party/closure_compiler/processor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698