(self)
| 511 | self.assertIn(cm.exception.args[0], (2006, 2013)) |
| 512 | |
| 513 | def test_init_command(self): |
| 514 | conn = self.connect( |
| 515 | init_command='SELECT "bar"; SELECT "baz"', |
| 516 | client_flag=CLIENT.MULTI_STATEMENTS, |
| 517 | ) |
| 518 | c = conn.cursor() |
| 519 | c.execute('select "foobar";') |
| 520 | self.assertEqual(("foobar",), c.fetchone()) |
| 521 | conn.close() |
| 522 | with self.assertRaises(pymysql.err.Error): |
| 523 | conn.ping(reconnect=False) |
| 524 | |
| 525 | def test_read_default_group(self): |
| 526 | conn = self.connect( |