def test_restore_original():
    example = ReflectivityExample()
    link = MetaLink(example, 'tag_exec', 'after', ['node'])
    rf_ast = reflectivipy.reflective_method_for(ReflectivityExample, 'example_while')
    original_body = rf_ast.original_ast.body[0].body
    node = original_body[1].test.left

    reflectivipy.link(link, node)

    example.tag = None
    ReflectivityExample().example_while()
    assert example.tag is node

    reflectivipy.uninstall_all()

    example.tag = None
    ReflectivityExample().example_while()
    assert example.tag is None
def setup():
    reflectivipy.uninstall_all()