def test_index(s): indexer.main(s.f) # result is here: m = {} execfile(fn_reg, m) funcs = ['Foo.sub', 'Foo.FooSub.subsub', 'fun1', 'fun2'] for f in funcs: assert f in m['funcs'] and f in m['reg'].keys() for f in funcs: for k in 'arg_keys', 'args', 'doc', 'pos_args': assert k in m['reg'][f] print('path', fn_reg)
def checkBuildData(): print("Checking if index and lexicon data exist...") if not os.path.exists("index.txt"): print( "The index has not been built yet! Building index and lexicon...") ind.main() lex.main() if not os.path.exists("lexicon.txt"): print("The lexicon has not been built yet! Building the lexicon...") lex.main()
def main(fileToIndex): constants.filetoIndex = fileToIndex indexesInit.main() #crawler.main(constants.filetoIndex) indexer.main() indexesInit.cleanup()
sys.exit(1) if len(db) == 0: print "database is empty" sys.exit(1) if headers is None: print "no data in index" sys.exit(1) if len(headers) == 0: print "index is empty" sys.exit(1) print "db loaded. %d entries" % len(db) def getDb(): if db is None: init_db(joiner.dbfile, joiner.indexfile) return [db, headers, queries] if __name__ == '__main__': if not os.path.exists(joiner.dbfile): joiner.main() if not os.path.exists(joiner.indexfile): indexer.main() app.run(port=PORT)
def main(): print indexer.main()
def verify_indexing(): if not os.path.exists('index.txt') or os.path.getsize('index.txt') <= 0: print('Indexing... (~3 minutes)') indexer.main()
def testIndexerMain(self): self.assertEqual(indexer.main(".config/config_test.yml"), None)
def main(): indexer.main() start_servers()