mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
Short-term fix for bug #2671682.
Make tests a little more parallel to trunk version. Add nose.collector as test_suite
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
import test_capabilities
|
||||
import capabilities
|
||||
import unittest
|
||||
import MySQLdb
|
||||
import warnings
|
||||
|
||||
warnings.filterwarnings('error')
|
||||
|
||||
class test_MySQLdb(test_capabilities.DatabaseTest):
|
||||
class test_MySQLdb(capabilities.DatabaseTest):
|
||||
|
||||
db_module = MySQLdb
|
||||
connect_args = ()
|
||||
@@ -72,6 +72,14 @@ class test_MySQLdb(test_capabilities.DatabaseTest):
|
||||
self.check_data_integrity(
|
||||
('col1 char(1)','col2 char(1)'),
|
||||
generator)
|
||||
|
||||
def test_bug_2671682(self):
|
||||
from MySQLdb.constants import ER
|
||||
try:
|
||||
self.cursor.execute("describe some_non_existent_table");
|
||||
except self.connection.ProgrammingError, msg:
|
||||
self.failUnless(msg[0] == ER.NO_SUCH_TABLE)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if test_MySQLdb.leak_test:
|
||||
|
||||
Reference in New Issue
Block a user