Lines Matching refs:globs
183 def _extract_future_flags(globs): argument
190 feature = globs.get(fname, None)
521 def __init__(self, examples, globs, name, filename, lineno, docstring): argument
530 self.globs = globs.copy()
552 self.globs == other.globs and \
659 def get_doctest(self, string, globs, name, filename, lineno): argument
668 return DocTest(self.get_examples(string, name), globs,
838 def find(self, obj, name=None, module=None, globs=None, extraglobs=None): argument
918 if globs is None:
920 globs = {}
922 globs = module.__dict__.copy()
924 globs = globs.copy()
926 globs.update(extraglobs)
927 if '__name__' not in globs:
928 globs['__name__'] = '__main__' # provide a default module name
932 self._find(tests, obj, name, module, source_lines, globs, {})
968 def _find(self, tests, obj, name, module, source_lines, globs, seen): argument
982 test = self._get_test(obj, name, module, globs, source_lines)
995 globs, seen)
1012 globs, seen)
1029 globs, seen)
1031 def _get_test(self, obj, name, module, globs, source_lines): argument
1066 return self._parser.get_doctest(docstring, globs, name,
1330 compileflags, 1), test.globs)
1441 compileflags = _extract_future_flags(test.globs)
1484 test.globs.clear()
1839 test.globs.clear()
1857 def testmod(m=None, name=None, globs=None, verbose=None, argument
1948 for test in finder.find(m, name, globs=globs, extraglobs=extraglobs):
1962 globs=None, verbose=None, report=True, optionflags=0, argument
2056 if globs is None:
2057 globs = {}
2059 globs = globs.copy()
2061 globs.update(extraglobs)
2062 if '__name__' not in globs:
2063 globs['__name__'] = '__main__'
2071 test = parser.get_doctest(text, globs, name, filename, 0)
2084 def run_docstring_examples(f, globs, verbose=False, name="NoName", argument
2104 for test in finder.find(f, name, globs=globs):
2173 test.globs.clear()
2332 def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, argument
2373 tests = test_finder.find(module, globs=globs, extraglobs=extraglobs)
2410 globs=None, parser=DocTestParser(), argument
2412 if globs is None:
2413 globs = {}
2415 globs = globs.copy()
2425 if "__file__" not in globs:
2426 globs["__file__"] = path
2432 test = parser.get_doctest(doc, globs, name, path, 0)
2606 def debug_src(src, pm=False, globs=None): argument
2609 debug_script(testsrc, pm, globs)
2611 def debug_script(src, pm=False, globs=None): argument
2615 if globs:
2616 globs = globs.copy()
2618 globs = {}
2622 exec(src, globs, globs)
2629 pdb.Pdb(nosigint=True).run("exec(%r)" % src, globs, globs)