def METHOD_NAME():
    with scoped_curdir():
        open('foo', 'w', encoding='utf-8').write('bar')
        try:
            with _sponge('foo') as f:
                f.write('hello')
                raise RuntimeError()
        except RuntimeError:
            pass
        assert open('foo', encoding='utf-8').read() == 'bar'