def test_update_value_missing_broken_multi_rowcount(self):
        @util.memoized_property
        def rowcount(self):
            if 1 > len(self.context.compiled_parameters):
                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=1)
                sess.add(p1)
                sess.flush()

                sess.execute(self.tables.parent.delete())

                p1.data = literal(1)
                assert_raises_message(
                    orm_exc.StaleDataError,
                    "UPDATE statement on table 'parent' expected to "
                    "update 1 row\(s\); 0 were matched.",
                    sess.flush
                )
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_unitofworkv2.py/BasicStaleChecksTest.test_update_value_missing_broken_multi_rowcount/swapped operands of `>`