@contextmanager
def cd(path):
    cwd = os.getcwd()
    os.chdir(path)
    try:
        yield
    finally:
        os.chdir(cwd)
We want to makes sure that if you use a template mixin, but forget the
dataset/ETHPy150Open jupyterhub/jupyterhub/tools/tasks.py/cd--crossover with--dataset/ETHPy150Open django/django/tests/generic_views/test_base.py/SingleObjectTemplateResponseMixinTest.test_template_mixin_without_template