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

Unified Diff: third_party/closure_compiler/processor_test.py

Issue 475493002: Closure compiler: add pydoc for parts of third_party/closure_compiler/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 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: third_party/closure_compiler/processor_test.py
diff --git a/third_party/closure_compiler/processor_test.py b/third_party/closure_compiler/processor_test.py
index 7d9765e5e8f11a25a816eeb6ff6582080b98b932..942d472ba7f3d09d9d39aede1aceafc343b4c652 100755
--- a/third_party/closure_compiler/processor_test.py
+++ b/third_party/closure_compiler/processor_test.py
@@ -3,11 +3,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+"""Test resources processing, i.e. <if> and <include> tag handling."""
+
import unittest
from processor import FileCache, Processor, LineNumber
class ProcessorTest(unittest.TestCase):
+ """Test <include> tag processing logic."""
+
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
self.maxDiff = None
@@ -58,6 +62,7 @@ debug(global);
self.assertEqual(expected_line.line_number, actual_line.line_number)
def testGetFileFromLine(self):
+ """Verify that inlined files retain their original line info."""
self.assertLineNumber(1, LineNumber("/checked.js", 1))
self.assertLineNumber(5, LineNumber("/checked.js", 5))
self.assertLineNumber(6, LineNumber("/global.js", 1))
@@ -68,11 +73,14 @@ debug(global);
self.assertLineNumber(11, LineNumber("/checked.js", 8))
def testIncludedFiles(self):
+ """Verify that files are tracked correctly as they're inlined."""
self.assertEquals(set(["/global.js", "/debug.js"]),
- self._processor.included_files())
+ self._processor.included_files)
class IfStrippingTest(unittest.TestCase):
+ """Test that the contents of XML <if> blocks are stripped."""
+
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
self.maxDiff = None
« third_party/closure_compiler/checker.py ('K') | « third_party/closure_compiler/processor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698