﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24476	Allow using set_script_prefix as a contextmanager	Tim Graham	Bas Peschier	"It would be useful if `set_script_prefix()` could be used as a contextmanager in addition to as a regular function. That would allow replacing this redundant pattern in tests:

{{{
set_script_prefix('/beverages/')
try:
    self.assertEqual(pf.get_absolute_url(), '/beverages/tea/')
finally:
    clear_script_prefix()
}}}

with:

{{{
with set_script_prefix('/beverages/'):
    self.assertEqual(pf.get_absolute_url(), '/beverages/tea/')
}}}"	Cleanup/optimization	closed	Core (URLs)	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
