def test_load_warnings(self):
        """Test load local infile produces the appropriate warnings"""
        conn = self.connect()
        c = conn.cursor()
        c.execute("CREATE TABLE test_load_local (a INTEGER, b INTEGER)")
        filename = os.path.join(
            os.path.dirname(os.path.realpath(__file__)),
            "data",
            "load_local_warn_data.txt",
        )
        try:
            c.execute(
                (
                    "LOAD DATA LOCAL INFILE '{0}' INTO TABLE "
                    + "test_load_local FIELDS TERMINATED BY ','"
                ).format(filename)
            )
            self.assertEqual(1, c.warning_count)

            c.execute("SHOW WARNINGS")
            w = c.fetchone()

            self.assertEqual(ER.TRUNCATED_WRONG_VALUE_FOR_FIELD, w[1])
            self.assertIn(
                "incorrect integer value",
                w[2].lower(),
            )
        finally:
            c.execute("DROP TABLE test_load_local")
            c.close()
Test load local infile produces the appropriate warnings
pymysql/tests/test_load_local.py