Ejemplo n.º 1
0
 def _build_symbol_index(self, project_root, custom_path, blacklist_re):
     index = importmagic.index.SymbolIndex(blacklist_re=blacklist_re)
     if os.environ.get('ELPY_TEST'):
         # test suite support: do not index the whole PYTHONPATH, it
         # takes much too long
         index.build_index([])
     elif custom_path:
         index.build_index(custom_path)
     else:
         index.build_index([project_root] + sys.path)
     self.symbol_index = index
Ejemplo n.º 2
0
 def _build_symbol_index(self, project_root, custom_path, blacklist_re):
     try:
         index = importmagic.index.SymbolIndex(blacklist_re=blacklist_re)
         if os.environ.get('ELPY_TEST'):
             # test suite support: do not index the whole PYTHONPATH, it
             # takes much too long
             index.build_index([])
         elif custom_path:
             index.build_index(custom_path)
         else:
             index.build_index([project_root] + sys.path)
     except Exception as e:
         self.fail_message = "symbol index failed to build: %s" % e
     else:
         self.symbol_index = index
Ejemplo n.º 3
0
 def _build_symbol_index(self, project_root, custom_path, blacklist_re):
     try:
         index = importmagic.index.SymbolIndex(blacklist_re=blacklist_re)
         if os.environ.get('ELPY_TEST'):
             # test suite support: do not index the whole PYTHONPATH, it
             # takes much too long
             index.build_index([])
         elif custom_path:
             index.build_index(custom_path)
         else:
             index.build_index([project_root] + sys.path)
     except Exception as e:
         self.fail_message = "symbol index failed to build: %s" % e
     else:
         self.symbol_index = index