mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
uhh. __builtins__ is a module in __main__ and a dict elsewhere
This commit is contained in:
parent
638c722228
commit
f63e343c39
1 changed files with 4 additions and 1 deletions
|
@ -1360,7 +1360,10 @@ class DocTestRunner:
|
|||
linecache.getlines = self.save_linecache_getlines
|
||||
if clear_globs:
|
||||
test.globs.clear()
|
||||
__builtins__['_'] = None
|
||||
if __name__ == "__main__":
|
||||
__builtins__._ = None
|
||||
else:
|
||||
__builtins__['_'] = None
|
||||
|
||||
#/////////////////////////////////////////////////////////////////
|
||||
# Summarization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue