]> granicus.if.org Git - python/commitdiff
test(): Avoid a UnboundLocalError when a method is missing from both the string
authorFinn Bock <bckfnn@worldonline.dk>
Sun, 9 Dec 2001 16:06:29 +0000 (16:06 +0000)
committerFinn Bock <bckfnn@worldonline.dk>
Sun, 9 Dec 2001 16:06:29 +0000 (16:06 +0000)
module and from string methods.

This closes patch "[ #490811 ] Jython and test_string".

Lib/test/test_string.py

index 3574719df484aaf7fc40f4fd00aa6b18a2b553a9..4c5a60aa2cd898929542f020fd10666b4bb175ed 100644 (file)
@@ -21,6 +21,7 @@ def test(name, input, output, *args):
             value = apply(f, (input,) + args)
     except:
         value = sys.exc_type
+        f = name
     if value != output:
         if verbose:
             print 'no'