Fix test_funcattrs.py: __name__ attribute must be str8.

This commit is contained in:
Walter Dörwald 2007-05-24 17:34:27 +00:00
parent 305b9246a7
commit 2565d90dd7
1 changed files with 2 additions and 2 deletions

View File

@ -258,8 +258,8 @@ def test_func_globals():
def test_func_name():
def f(): pass
verify(f.__name__ == "f")
f.__name__ = "g"
verify(f.__name__ == "g")
f.__name__ = str8("g")
verify(f.__name__ == str8("g"))
cantset(f, "__globals__", 1)
cantset(f, "__name__", 1)
# test that you can access func.__name__ in restricted mode