summaryrefslogtreecommitdiff
path: root/MySQLdb/tests
diff options
context:
space:
mode:
Diffstat (limited to 'MySQLdb/tests')
-rw-r--r--MySQLdb/tests/capabilities.py3
-rw-r--r--MySQLdb/tests/test_MySQLdb_capabilities.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/MySQLdb/tests/capabilities.py b/MySQLdb/tests/capabilities.py
index 0b508fa..6bb7436 100644
--- a/MySQLdb/tests/capabilities.py
+++ b/MySQLdb/tests/capabilities.py
@@ -24,8 +24,9 @@ class DatabaseTest(unittest.TestCase):
db = self.db_module.connect(*self.connect_args, **self.connect_kwargs)
self.connection = db
self.cursor = db.cursor()
+ # TODO: this needs to be re-evaluated for Python 3
self.BLOBText = ''.join([chr(i) for i in range(256)] * 100);
- self.BLOBUText = ''.join([unichr(i) for i in range(16384)])
+ self.BLOBUText = u''.join([unichr(i) for i in range(16384)])
self.BLOBBinary = self.db_module.Binary(''.join([chr(i) for i in range(256)] * 16))
leak_test = True
diff --git a/MySQLdb/tests/test_MySQLdb_capabilities.py b/MySQLdb/tests/test_MySQLdb_capabilities.py
index a8f144a..98a2371 100644
--- a/MySQLdb/tests/test_MySQLdb_capabilities.py
+++ b/MySQLdb/tests/test_MySQLdb_capabilities.py
@@ -77,8 +77,8 @@ class test_MySQLdb(capabilities.DatabaseTest):
from MySQLdb.constants import ER
try:
self.cursor.execute("describe some_non_existent_table");
- except self.connection.ProgrammingError as (msg,):
- self.assertTrue(msg[0] == ER.NO_SUCH_TABLE)
+ except self.connection.ProgrammingError as msg:
+ self.assertTrue(msg.args[0].args[0] == ER.NO_SUCH_TABLE)
def test_bug_3514287(self):
c = self.cursor