New submission from DqASe:

Currently doctest makes shallow copies of the environment or globs argument.  
This is somewhat un-symmetrical: on the one hand, a test cannot see variables 
created by another, but on the other, it can alter mutable objects.  This is 
inconvenient e.g. when documenting several methods that change an object (say, 
obj.append() , then obj.insert() - one would hope that the results are 
independent on the order tests are executed ).

An option to make deep copies of the variables in the context, instead of 
shallow ones, would in my opinion solve the issue cleanly.

----------
components: Library (Lib)
messages: 264452
nosy: DqASe
priority: normal
severity: normal
status: open
title: Allow doctest to deep copy globals
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to