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

Side by Side Diff: tools/telemetry/third_party/coverage/__main__.py

Issue 1366913004: Add coverage Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
3
1 """Be able to execute coverage.py by pointing Python at a working tree.""" 4 """Be able to execute coverage.py by pointing Python at a working tree."""
2 5
3 import runpy, os 6 import runpy, os
4 7
5 PKG = 'coverage' 8 PKG = 'coverage'
6 9
7 try: 10 try:
8 run_globals = runpy.run_module(PKG, run_name='__main__', alter_sys=True) 11 run_globals = runpy.run_module(PKG, run_name='__main__', alter_sys=True)
9 executed = os.path.splitext(os.path.basename(run_globals['__file__']))[0] 12 executed = os.path.splitext(os.path.basename(run_globals['__file__']))[0]
10 if executed != '__main__': # For Python 2.5 compatibility 13 if executed != '__main__': # For Python 2.5 compatibility
11 raise ImportError( 14 raise ImportError(
12 'Incorrectly executed %s instead of __main__' % executed 15 'Incorrectly executed %s instead of __main__' % executed
13 ) 16 )
14 except ImportError: # For Python 2.6 compatibility 17 except ImportError: # For Python 2.6 compatibility
15 runpy.run_module('%s.__main__' % PKG, run_name='__main__', alter_sys=True) 18 runpy.run_module('%s.__main__' % PKG, run_name='__main__', alter_sys=True)
OLDNEW
« no previous file with comments | « tools/telemetry/third_party/coverage/TODO.txt ('k') | tools/telemetry/third_party/coverage/appveyor.yml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698