def test_update_multi_missing_broken_multi_rowcount(self):
        @util.memoized_property
        def rowcount(self):
            if len(self.context.compiled_parameters) > 1:
                return -1
            else:
                return self.context.rowcount

        with patch.object(
                config.db.dialect, "supports_sane_multi_rowcount", False):
            with patch(
                    "sqlalchemy.engine.result.ResultProxy.rowcount",
                    rowcount):
                Parent, Child = self._fixture()
                sess = Session()
                p1 = Parent(id=1, data=2)
                p2 = Parent(id=2, data=3)
                sess.add_all([p1, p2])
                sess.flush()

                sess.execute(self.tables.parent.delete().where(Parent.id == 1))

                p1.data = 3
                p2.data = 4
                sess.flush()  # no exception

                # update occurred for remaining row
                eq_(
                    sess.query(Parent.id, Parent.data).all(),
                    [(2, 4)]
                )
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_unitofworkv2.py/BasicStaleChecksTest.test_update_multi_missing_broken_multi_rowcount/original