Replaced assertGreater with assertNotEqual so that the code runs with Python 2.6 too.

This commit is contained in:
Philipp Spitzer
2015-07-20 23:32:14 +02:00
parent 670cede43b
commit 91054f07cb

View File

@ -116,12 +116,12 @@ class test_MySQLdb(capabilities.DatabaseTest):
c.execute("SELECT id, AsWKB(border) FROM test_MULTIPOLYGON") c.execute("SELECT id, AsWKB(border) FROM test_MULTIPOLYGON")
row = c.fetchone() row = c.fetchone()
self.assertEqual(row[0], 1) self.assertEqual(row[0], 1)
self.assertGreater(len(row[1]), 0) self.assertNotEqual(len(row[1]), 0)
c.execute("SELECT id, border FROM test_MULTIPOLYGON") c.execute("SELECT id, border FROM test_MULTIPOLYGON")
row = c.fetchone() row = c.fetchone()
self.assertEqual(row[0], 1) self.assertEqual(row[0], 1)
self.assertGreater(len(row[1]), 0) self.assertNotEqual(len(row[1]), 0)
finally: finally:
c.execute("drop table if exists test_MULTIPOLYGON") c.execute("drop table if exists test_MULTIPOLYGON")