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

Side by Side Diff: third_party/coverage-3.7.1/coverage/codeunit.py

Issue 225633007: Upgrade to coverage 3.7.1 and have it auto-build itself on first use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: no more warning Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 """Code unit (module) handling for Coverage.""" 1 """Code unit (module) handling for Coverage."""
2 2
3 import glob, os 3 import glob, os
4 4
5 from coverage.backward import open_source, string_class, StringIO 5 from coverage.backward import open_source, string_class, StringIO
6 from coverage.misc import CoverageException 6 from coverage.misc import CoverageException
7 7
8 8
9 def code_unit_factory(morfs, file_locator): 9 def code_unit_factory(morfs, file_locator):
10 """Construct a list of CodeUnits from polymorphic inputs. 10 """Construct a list of CodeUnits from polymorphic inputs.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 _, ext = os.path.splitext(self.filename) 136 _, ext = os.path.splitext(self.filename)
137 137
138 # Anything named *.py* should be Python. 138 # Anything named *.py* should be Python.
139 if ext.startswith('.py'): 139 if ext.startswith('.py'):
140 return True 140 return True
141 # A file with no extension should be Python. 141 # A file with no extension should be Python.
142 if not ext: 142 if not ext:
143 return True 143 return True
144 # Everything else is probably not Python. 144 # Everything else is probably not Python.
145 return False 145 return False
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698