mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 03:50:43 +08:00
Add a test for connection.ping()
This commit is contained in:
@ -79,7 +79,10 @@ class test_MySQLdb(capabilities.DatabaseTest):
|
|||||||
self.cursor.execute("describe some_non_existent_table");
|
self.cursor.execute("describe some_non_existent_table");
|
||||||
except self.connection.ProgrammingError, msg:
|
except self.connection.ProgrammingError, msg:
|
||||||
self.failUnless(msg[0] == ER.NO_SUCH_TABLE)
|
self.failUnless(msg[0] == ER.NO_SUCH_TABLE)
|
||||||
|
|
||||||
|
def test_ping(self):
|
||||||
|
self.connection.ping()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if test_MySQLdb.leak_test:
|
if test_MySQLdb.leak_test:
|
||||||
|
Reference in New Issue
Block a user