Run tests in Github Actions (#457)

This commit is contained in:
Inada Naoki
2020-12-07 17:39:09 +09:00
committed by GitHub
parent 3431f56324
commit 329bae79c8
5 changed files with 50 additions and 9 deletions

View File

@ -120,12 +120,12 @@ class test_MySQLdb(capabilities.DatabaseTest):
INSERT INTO test_MULTIPOLYGON
(id, border)
VALUES (1,
Geomfromtext(
ST_Geomfromtext(
'MULTIPOLYGON(((1 1, 1 -1, -1 -1, -1 1, 1 1)),((1 1, 3 1, 3 3, 1 3, 1 1)))'))
"""
)
c.execute("SELECT id, AsText(border) FROM test_MULTIPOLYGON")
c.execute("SELECT id, ST_AsText(border) FROM test_MULTIPOLYGON")
row = c.fetchone()
self.assertEqual(row[0], 1)
self.assertEqual(
@ -133,7 +133,7 @@ VALUES (1,
"MULTIPOLYGON(((1 1,1 -1,-1 -1,-1 1,1 1)),((1 1,3 1,3 3,1 3,1 1)))",
)
c.execute("SELECT id, AsWKB(border) FROM test_MULTIPOLYGON")
c.execute("SELECT id, ST_AsWKB(border) FROM test_MULTIPOLYGON")
row = c.fetchone()
self.assertEqual(row[0], 1)
self.assertNotEqual(len(row[1]), 0)