summaryrefslogtreecommitdiff
path: root/tests/mysqldb_test.py
diff options
context:
space:
mode:
authorSergey Shepelev <temotor@gmail.com>2014-04-24 17:51:27 +0400
committerSergey Shepelev <temotor@gmail.com>2014-04-24 18:11:37 +0400
commitcbd404d56e231ea5419f07795a12d7082dd70ec4 (patch)
tree7ad24a0f80e064b94108bb38b8c4a8a3eebafb44 /tests/mysqldb_test.py
parentc467ded4a6e777518cd7a3888149510e3b31d334 (diff)
downloadeventlet-cbd404d56e231ea5419f07795a12d7082dd70ec4.tar.gz
python3 compatibility
- __next__ for iterator interface - six.next() to get next item - list(dict.keys()) - popen2.popen4 -> subprocess - s2b -> b"..." literals - deprecated assertEquals -> assertEqual - hub_test test_fork using run_python - 1L -> 1 long literal - many PEP-8 fixes
Diffstat (limited to 'tests/mysqldb_test.py')
-rw-r--r--tests/mysqldb_test.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/mysqldb_test.py b/tests/mysqldb_test.py
index cfc9940..c4a77b0 100644
--- a/tests/mysqldb_test.py
+++ b/tests/mysqldb_test.py
@@ -122,14 +122,18 @@ class TestMySQLdb(LimitedTestCase):
gt = eventlet.spawn(tick)
curs.execute("select 1")
rows = curs.fetchall()
- self.assertEqual(rows, ((1L,),))
+ self.assertEqual(len(rows), 1)
+ self.assertEqual(len(rows[0]), 1)
+ self.assertEqual(rows[0][0], 1)
self.assert_(counter[0] > 0, counter[0])
gt.kill()
def assert_cursor_works(self, cursor):
cursor.execute("select 1")
rows = cursor.fetchall()
- self.assertEqual(rows, ((1L,),))
+ self.assertEqual(len(rows), 1)
+ self.assertEqual(len(rows[0]), 1)
+ self.assertEqual(rows[0][0], 1)
self.assert_cursor_yields(cursor)
def assert_connection_works(self, conn):