]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.5] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. ...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 28 Apr 2017 17:05:53 +0000 (20:05 +0300)
committerGitHub <noreply@github.com>
Fri, 28 Apr 2017 17:05:53 +0000 (20:05 +0300)
commit910ba937e90ffe3aa154a5b27dc7e2c3d3c88d1f
tree6c1a617a511ad3390afb9dac8bbe4fc23ae45d72
parent98c7a9e662b49029ff051b6699ddc0f542663c96
[3.5] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. (#1341) (#1346)

They now work when delete replaced attribute or item inside the with
statement.  The old value of the attribute or item (or None if it doesn't
exist) now will be assigned to the target of the "as" clause, if there is
one.

(cherry picked from commit d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83)
Lib/test/support/__init__.py
Lib/test/test_support.py
Lib/test/test_tempfile.py
Misc/NEWS