def testInsertWithFile(self):
        """testing insert with file"""
        assert self.has_table("texttable"), "missing attribute texttable"
        fp = open(tempfile.mktemp(), "w")
        c = self.cursor()
        try:
            try:
                c.execute(self.table("texttable")[1])
                data = fp.name * 300
                data = data[:3500]
                fp.write(data)
                fp.flush()
                fp.close()
                fp = open(fp.name, "r")
                c.execute("insert into %s (a, b) values (?, ?)" % (self.table("texttable")[0]), [(0, fp)], {1:zxJDBC.LONGVARCHAR})
                self.db.commit()
                c.execute("select b from %s" % (self.table("texttable")[0]))
                f = c.fetchall()
                assert len(f) == 1, "expected [1] row, got [%d]" % (len(f))
                assert len(f[0][0]) == len(data), (len(data), len(f[0][0])) % "expected [%d], got [%d]"
                assert data == f[0][0], "failed to retrieve the same text as inserted"
            except Exception, e:
                raise e
        finally:
            c.execute("drop table %s" % (self.table("texttable")[0]))
            c.close()
            self.db.commit()
            fp.close()
            os.remove(fp.name)
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/zxjdbc/zxtest.py/zxAPITestCase.testInsertWithFile/swapped operands of `%`