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

Side by Side Diff: infra/ext/__init__.py

Issue 355153002: Refactor infra git libs and testing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra@fake_testing_support
Patch Set: Created 6 years, 5 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 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 7
8 8
9 def _add_ext_dirs_to_path(): 9 def _add_ext_dirs_to_path():
10 base = os.path.dirname(os.path.abspath(__file__)) 10 base = os.path.dirname(os.path.abspath(__file__))
(...skipping 11 matching lines...) Expand all
22 # imports, but doesn't make python import them immediately at runtime. 22 # imports, but doesn't make python import them immediately at runtime.
23 # 23 #
24 # This list should always contain a complete list of all modules in ext. 24 # This list should always contain a complete list of all modules in ext.
25 if False: 25 if False:
26 import requests 26 import requests
27 import argcomplete 27 import argcomplete
28 import testing_support 28 import testing_support
29 29
30 30
31 class _LazyImportHack(object): 31 class _LazyImportHack(object):
32 __path__ = []
32 33
33 def __getattr__(self, name): 34 def __getattr__(self, name):
34 mod = __import__(name) 35 mod = __import__(name)
35 setattr(self, name, mod) 36 setattr(self, name, mod)
36 return mod 37 return mod
37 38
38 sys.modules[__name__] = _LazyImportHack() 39 sys.modules[__name__] = _LazyImportHack()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698