Skip to content
Myr

Prevent UnboundLocalError in test_build_error_handler

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Neuhäuser · committed by Daniel Neuhäuser · parent 43b6d0a · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:flask/testsuite/basic.py+2 added-2 removed
751 unmodified lines
752 # Verify the error is re-raised if not the current exception.753 try:754 with app.test_request_context():755 flask.url_for('spam')756 except BuildError as error:757 pass756 except BuildError as err:757 error = err758 try:759 raise RuntimeError('Test case where BuildError is not current.')760 except RuntimeError:761 self.assertRaises(BuildError, app.handle_url_build_error, error, 'spam', {})
389 unmodified lines