def test_scalar_move_commitfirst(self):
        User, Address = self.classes.User, self.classes.Address

        sess = sessionmaker()()

        u1 = User(name='jack')
        u2 = User(name='ed')
        a1 = Address(email_address='a1')
        a1.user = u1
        sess.add_all([u1, u2, a1])
        sess.commit()

        # u1.addresses is loaded
        u1.addresses

        # direct set - the fetching of the
        # "old" u1 here allows the backref
        # to remove it from the addresses collection
        a1.user = u2

        sess.commit()
        assert u1.addresses not in a1
        assert a1 in u2.addresses
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_backref_mutations.py/O2MCollectionTest.test_scalar_move_commitfirst/swapped operands of `not in`