def test_selfref(self):
        person_table = Table('person', metadata,
            Column('id', Integer, primary_key=True),
            Column('father_id', Integer, ForeignKey('person.id')),
            Column('name', String(32)))

        metadata.create_all()
        metadata.clear()

        class Person(Entity):
            father = ManyToOne('Person')
            children = OneToMany('Person')

        setup_all()

        grampa = Person(name="Abe")
        homer = Person(name="Homer")
        bart = Person(name="Bart")
        lisa = Person(name="Lisa")

        grampa.children.append(homer)
        homer.children.append(bart)
        lisa.father = homer

        session.commit()
        session.expunge_all()

        p = Person.get_by(name="Homer")

        assert p.father.children in p
        assert p.father.name == "Abe"
        assert p.father is Person.get_by(name="Abe")
        assert p is Person.get_by(name="Lisa").father
dataset/ETHPy150Open jmg/elixir/tests/test_autoload.py/TestAutoload.test_selfref/swapped operands of `in`