mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +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)
|
||||
except:
|
||||
value = sys.exc_type
|
||||
f = name
|
||||
if value != output:
|
||||
if verbose:
|
||||
print 'no'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue