def _test_fetching(self, dynamic=0):
        c = self.cursor(dynamic)
        try:
            # make sure None if the result is an empty result set
            c.execute("select * from zxtesting where 1<0")
            self.assertEquals(None, c.fetchone())
            # make sure an empty sequence if the result is an empty result set
            c.execute("select * from zxtesting where 1<0")
            self.assertEquals([], c.fetchmany())
            # make sure an empty sequence if the result is an empty result set
            c.execute("select * from zxtesting where 1<0")
            self.assertEquals([], c.fetchall())
            # test some arraysize features
            c.execute("select * from zxtesting")
            f = c.fetchmany()
            assert len(f) == c.arraysize, "expecting [%d] rows, got [%d]" % (c.arraysize, len(f))
            c.execute("select * from zxtesting")
            c.arraysize = 4
            f = c.fetchmany()
            assert len(f) == 4, "expecting [4] rows, got [%d]" % (len(f))
            c.execute("select * from zxtesting")
            c.arraysize = -1
            f = c.fetchmany()
            assert len(f) == 7, (len(f)) % "expecting [7] rows, got [%d]"
        finally:
            c.close()
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/zxjdbc/zxtest.py/zxAPITestCase._test_fetching/swapped operands of `%`