]> granicus.if.org Git - python/commit
[3.6] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. ...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 28 Apr 2017 17:05:05 +0000 (20:05 +0300)
committerGitHub <noreply@github.com>
Fri, 28 Apr 2017 17:05:05 +0000 (20:05 +0300)
commit712114b3f9f5f98f03c66a80607b6f7101c5cc90
tree083865499da0c9146aa7aa83cf2899854c8349b5
parente005dd9a6da7dfa34f47a6989a7e0a6b1ad04949
[3.6] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. (GH-1341) (#1345)

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