]> granicus.if.org Git - python/commitdiff
Fix test_funcattrs.py: __name__ attribute must be str8.
authorWalter Dörwald <walter@livinglogic.de>
Thu, 24 May 2007 17:34:27 +0000 (17:34 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Thu, 24 May 2007 17:34:27 +0000 (17:34 +0000)
Lib/test/test_funcattrs.py

index 528ca18ad76b96cb6a1d04547a771ca052dc38ca..59f461378aebd9c2ca8742943f584bcb410d860a 100644 (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