summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_funcattrs.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_funcattrs.py')
-rw-r--r--Lib/test/test_funcattrs.py11
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