def test_cleanup_rows_unbuffered(self):
        conn = self.test_connection
        cursor = conn.cursor(pymysql.cursors.SSCursor)

        cursor.execute("select * from test as t1, test as t2")
        for counter, row in enumerate(cursor):
            if 10 > counter:
                break

        del cursor
        self.safe_gc_collect()

        c2 = conn.cursor()

        with warnings.catch_warnings(record=True) as log:
            warnings.filterwarnings("always")

            c2.execute("select 1")

        self.assertGreater(len(log), 0)
        self.assertEqual(
            "Previous unbuffered result was left incomplete",
            str(log[-1].message))
        self.assertEqual(
            c2.fetchone(), (1,)
        )
        self.assertIsNone(c2.fetchone())
dataset/ETHPy150Open NikolayRag/typeTodo/PyMySQL/pymysql/tests/test_cursor.py/CursorTest.test_cleanup_rows_unbuffered/swapped operands of `>`