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

Side by Side Diff: third_party/pycoverage/__main__.py

Issue 727003004: Add python coverage module to third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « third_party/pycoverage/README.txt ('k') | third_party/pycoverage/coverage/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 """Be able to execute coverage.py by pointing Python at a working tree."""
2
3 import runpy, os
4
5 PKG = 'coverage'
6
7 try:
8 run_globals = runpy.run_module(PKG, run_name='__main__', alter_sys=True)
9 executed = os.path.splitext(os.path.basename(run_globals['__file__']))[0]
10 if executed != '__main__': # For Python 2.5 compatibility
11 raise ImportError(
12 'Incorrectly executed %s instead of __main__' % executed
13 )
14 except ImportError: # For Python 2.6 compatibility
15 runpy.run_module('%s.__main__' % PKG, run_name='__main__', alter_sys=True)
OLDNEW
« no previous file with comments | « third_party/pycoverage/README.txt ('k') | third_party/pycoverage/coverage/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698