• Home
  • Raw
  • Download

Lines Matching refs:globs

178 def _extract_future_flags(globs):  argument
185 feature = globs.get(fname, None)
523 def __init__(self, examples, globs, name, filename, lineno, docstring): argument
532 self.globs = globs.copy()
553 self.globs == other.globs and \
662 def get_doctest(self, string, globs, name, filename, lineno): argument
671 return DocTest(self.get_examples(string, name), globs,
841 def find(self, obj, name=None, module=None, globs=None, extraglobs=None): argument
912 if globs is None:
914 globs = {}
916 globs = module.__dict__.copy()
918 globs = globs.copy()
920 globs.update(extraglobs)
921 if '__name__' not in globs:
922 globs['__name__'] = '__main__' # provide a default module name
926 self._find(tests, obj, name, module, source_lines, globs, {})
954 def _find(self, tests, obj, name, module, source_lines, globs, seen): argument
968 test = self._get_test(obj, name, module, globs, source_lines)
980 globs, seen)
998 globs, seen)
1015 globs, seen)
1017 def _get_test(self, obj, name, module, globs, source_lines): argument
1051 return self._parser.get_doctest(docstring, globs, name,
1315 compileflags, 1) in test.globs
1427 compileflags = _extract_future_flags(test.globs)
1461 test.globs.clear()
1801 test.globs.clear()
1819 def testmod(m=None, name=None, globs=None, verbose=None, argument
1910 for test in finder.find(m, name, globs=globs, extraglobs=extraglobs):
1924 globs=None, verbose=None, report=True, optionflags=0, argument
2017 if globs is None:
2018 globs = {}
2020 globs = globs.copy()
2022 globs.update(extraglobs)
2023 if '__name__' not in globs:
2024 globs['__name__'] = '__main__'
2035 test = parser.get_doctest(text, globs, name, filename, 0)
2048 def run_docstring_examples(f, globs, verbose=False, name="NoName", argument
2068 for test in finder.find(f, name, globs=globs):
2078 def __init__(self, mod=None, globs=None, verbose=None, optionflags=0): argument
2083 if mod is None and globs is None:
2088 if globs is None:
2089 globs = mod.__dict__
2090 self.globs = globs
2099 test = DocTestParser().get_doctest(s, self.globs, name, None, None)
2110 globs=self.globs)
2202 test.globs.clear()
2358 def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, argument
2399 tests = test_finder.find(module, globs=globs, extraglobs=extraglobs)
2446 globs=None, parser=DocTestParser(), argument
2448 if globs is None:
2449 globs = {}
2451 globs = globs.copy()
2460 if "__file__" not in globs:
2461 globs["__file__"] = path
2471 test = parser.get_doctest(doc, globs, name, path, 0)
2645 def debug_src(src, pm=False, globs=None): argument
2648 debug_script(testsrc, pm, globs)
2650 def debug_script(src, pm=False, globs=None): argument
2663 if globs:
2664 globs = globs.copy()
2666 globs = {}
2670 execfile(srcfilename, globs, globs)
2677 pdb.run("execfile(%r)" % srcfilename, globs, globs)