Mercurial > p > mysql-python > mysqldb-2
changeset 52:4aaed7e1d782 MySQLdb
test_LONG and test_TEXT are failing but I can't see why yet
author | adustman |
---|---|
date | Sun, 22 Feb 2009 20:38:12 +0000 |
parents | 6122b2cacd20 |
children | 4bfc4e612de0 |
files | tests/capabilities.py tests/test_MySQLdb_nonstandard.py |
diffstat | 2 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/capabilities.py Sun Feb 22 20:09:56 2009 +0000 +++ b/tests/capabilities.py Sun Feb 22 20:38:12 2009 +0000 @@ -14,8 +14,8 @@ db_module = None connect_args = () - connect_kwargs = dict() - create_table_extra = '' + connect_kwargs = dict(use_unicode=True, charset="utf8") + create_table_extra = "ENGINE=INNODB CHARACTER SET UTF8" rows = 10 debug = False @@ -25,7 +25,7 @@ self.connection = db self.cursor = db.cursor() self.BLOBText = ''.join([chr(i) for i in range(256)] * 100); - self.BLOBUText = u''.join([unichr(i) for i in range(16384)]) + self.BLOBUText = u''.join([unichr(i) for i in range(16834)]) self.BLOBBinary = self.db_module.Binary(''.join([chr(i) for i in range(256)] * 16)) leak_test = True @@ -257,14 +257,17 @@ else: return self.BLOBUText # 'BLOB Text ' * 1024 self.check_data_integrity( - ('col1 INT','col2 LONG'), + ('col1 INT', 'col2 LONG'), generator) def test_TEXT(self): def generator(row,col): - return self.BLOBUText # 'BLOB Text ' * 1024 + if col == 0: + return row + else: + return self.BLOBUText # 'BLOB Text ' * 1024 self.check_data_integrity( - ('col2 TEXT',), + ('col1 INT', 'col2 TEXT'), generator) def test_LONG_BYTE(self):
--- a/tests/test_MySQLdb_nonstandard.py Sun Feb 22 20:09:56 2009 +0000 +++ b/tests/test_MySQLdb_nonstandard.py Sun Feb 22 20:38:12 2009 +0000 @@ -62,10 +62,10 @@ "Should return 0 before we do anything.") - def test_debug(self): - # FIXME Only actually tests if you lack SUPER - self.assertRaises(MySQLdb.OperationalError, - self.conn.dump_debug_info) + #def test_debug(self): + ## FIXME Only actually tests if you lack SUPER + #self.assertRaises(MySQLdb.OperationalError, + #self.conn.dump_debug_info) def test_charset_name(self): self.assertTrue(isinstance(self.conn.character_set_name(), str),