diff options
author | Michael W. Hudson <mwh@python.net> | 2004-08-12 18:12:44 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2004-08-12 18:12:44 (GMT) |
commit | 5e897959db37752da4c6b476903cdc5e1357093c (patch) | |
tree | 73745bf828ac5d8d77254a9d2895169ae6bbae3c /Lib/test/test_funcattrs.py | |
parent | 5523c2517f14aed04f94865189ce986040652415 (diff) | |
download | cpython-5e897959db37752da4c6b476903cdc5e1357093c.zip cpython-5e897959db37752da4c6b476903cdc5e1357093c.tar.gz cpython-5e897959db37752da4c6b476903cdc5e1357093c.tar.bz2 |
This is my patch
[ 1004703 ] Make func_name writable
plus fixing a couple of nits in the documentation changes spotted by MvL
and a Misc/NEWS entry.
Diffstat (limited to 'Lib/test/test_funcattrs.py')
-rw-r--r-- | Lib/test/test_funcattrs.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py index 2c31d36..3ccb263 100644 --- a/Lib/test/test_funcattrs.py +++ b/Lib/test/test_funcattrs.py @@ -268,8 +268,15 @@ def test_func_name(): def f(): pass verify(f.__name__ == "f") verify(f.func_name == "f") - cantset(f, "func_name", "f") - cantset(f, "__name__", "f") + f.__name__ = "g" + verify(f.__name__ == "g") + verify(f.func_name == "g") + f.func_name = "h" + verify(f.__name__ == "h") + verify(f.func_name == "h") + cantset(f, "func_globals", 1) + cantset(f, "__name__", 1) + def test_func_code(): def f(): pass |