def main(args=None): parser = parse_commandline() options, args = parser.parse_args(copy(args)) if not options.nopythonpath: setpythonpaths(PathInfo.runfile, PathInfo.rootdir) fastfork = None do_sphinx = options.sphinx or options.everything do_text = options.everything or not options.sphinx if options.coverage or options.add_coverage: assert not options.fastfork, "Cannot fastfork and run coverage simultaneously" assert not do_sphinx, "Cannot run sphinx and coverage simultaneously" PathInfo.add_coverage(options.add_coverage) elif options.fastfork: fastfork = PathInfo.load_subprocess() updatemd5 = options.updatemd5 if updatemd5 is not None and updatemd5 not in 'good bad incomplete unknown deprecated'.split(): raise SystemExit('Unexpected value for updatemd5: %s' % updatemd5) run_testlist(args, options.incremental, fastfork, do_text, do_sphinx, options.updatemd5)
def main(args=None): parser = parse_commandline() options, args = parser.parse_args(copy(args)) if not options.nopythonpath: setpythonpaths(PathInfo.runfile, PathInfo.rootdir) fastfork = None do_sphinx = options.sphinx or options.everything do_text = options.everything or not options.sphinx if options.coverage or options.add_coverage: assert not options.fastfork, "Cannot fastfork and run coverage simultaneously" assert not do_sphinx, "Cannot run sphinx and coverage simultaneously" PathInfo.add_coverage(options.add_coverage) elif options.fastfork: fastfork = PathInfo.load_subprocess() updatemd5 = options.updatemd5 if updatemd5 is not None and updatemd5 not in 'good bad incomplete unknown deprecated'.split(): raise SystemExit('Unexpected value for updatemd5: %s. Expected one of: "good", "bad", "incomplete", "unknown" or "deprecated"' % updatemd5, ) errcode = run_testlist(args, options.incremental, fastfork, do_text, do_sphinx, options.updatemd5) exit(errcode)
Executing zinspector12 with arguments will report on where each name in the arguments list is imported from. ''' import pythonpaths import sys loader = '../../bin/rst2pdf' checkdirs = '../', importf = '../r2p_imports.py' ignore = set(''.split()) pythonpaths.setpythonpaths(loader) sys.path[0:0] = checkdirs def readf(fname): f = open(fname, 'rb') data = f.read() f.close() for splitcomment in ('"""', "'''"): data = data.split(splitcomment) assert len(data) in (1, 3) data = data[-1] data = [x.split('#')[0].rstrip() for x in data.splitlines()] for line in data: if line: yield line