DqASe added the comment: Alternatively, add an option like deepglobs={...} . The dictionary argument would be deep-copied at each test and added to the environment. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue26878> _______________________________________