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:
adustman
2009-03-08 16:34:49 +00:00
parent 75a6326614
commit 0e2dbef519
6 changed files with 17 additions and 8 deletions

View File

@@ -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: