mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
test(): Avoid a UnboundLocalError when a method is missing from both the string
module and from string methods. This closes patch "[ #490811 ] Jython and test_string".
This commit is contained in:
parent
d08011a0e1
commit
ed69aeedb9
1 changed files with 1 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ def test(name, input, output, *args):
|
||||||
value = apply(f, (input,) + args)
|
value = apply(f, (input,) + args)
|
||||||
except:
|
except:
|
||||||
value = sys.exc_type
|
value = sys.exc_type
|
||||||
|
f = name
|
||||||
if value != output:
|
if value != output:
|
||||||
if verbose:
|
if verbose:
|
||||||
print 'no'
|
print 'no'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue