Michael Foord added the comment: That's better - thanks. Another minor tweak needed though. stopall should only stop patches that were started with "start", not those used as context managers or decorators (or they will be stopped twice!).
See how the main patch object only adds to the set of active patches in the start method, not in __enter__ (and removes in stop rather than __exit__). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21600> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com