summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-10-07 00:54:14 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-10-07 00:54:14 +0000
commit758828ed544966cd78524f450f877be5b789fee4 (patch)
tree6a5839fae5738d0a7ae339d90fb246fce05a0330 /test
parent427baabc66743b2bbe978c61ff96251201fbc43d (diff)
downloadsqlalchemy-758828ed544966cd78524f450f877be5b789fee4.tar.gz
assorted firebird fixes from Lele Gaifax
Diffstat (limited to 'test')
-rw-r--r--test/sql/select.py11
-rw-r--r--test/testbase.py6
2 files changed, 12 insertions, 5 deletions
diff --git a/test/sql/select.py b/test/sql/select.py
index ac5af4f3b..2804da344 100644
--- a/test/sql/select.py
+++ b/test/sql/select.py
@@ -1,7 +1,7 @@
from testbase import PersistTest
import testbase
from sqlalchemy import *
-from sqlalchemy.databases import sqlite, postgres, mysql, oracle
+from sqlalchemy.databases import sqlite, postgres, mysql, oracle, firebird
import unittest, re
# the select test now tests almost completely with TableClause/ColumnClause objects,
@@ -264,9 +264,14 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") A
def testalias(self):
# test the alias for a table1. column names stay the same, table name "changes" to "foo".
self.runtest(
- select([alias(table1, 'foo')])
- ,"SELECT foo.myid, foo.name, foo.description FROM mytable AS foo")
+ select([alias(table1, 'foo')])
+ ,"SELECT foo.myid, foo.name, foo.description FROM mytable AS foo")
+ self.runtest(
+ select([alias(table1, 'foo')])
+ ,"SELECT foo.myid, foo.name, foo.description FROM mytable foo"
+ ,dialect=firebird.dialect())
+
# create a select for a join of two tables. use_labels means the column names will have
# labels tablename_columnname, which become the column keys accessible off the Selectable object.
# also, only use one column from the second table and all columns from the first table1.
diff --git a/test/testbase.py b/test/testbase.py
index d115d400a..b62f41f6a 100644
--- a/test/testbase.py
+++ b/test/testbase.py
@@ -40,7 +40,7 @@ def parse_argv():
parser = optparse.OptionParser(usage = "usage: %prog [options] files...")
parser.add_option("--dburi", action="store", dest="dburi", help="database uri (overrides --db)")
- parser.add_option("--db", action="store", dest="db", default="sqlite", help="prefab database uri (sqlite, sqlite_file, postgres, mysql, oracle, oracle8, mssql)")
+ parser.add_option("--db", action="store", dest="db", default="sqlite", help="prefab database uri (sqlite, sqlite_file, postgres, mysql, oracle, oracle8, mssql, firebird)")
parser.add_option("--mockpool", action="store_true", dest="mockpool", help="use mock pool")
parser.add_option("--verbose", action="store_true", dest="verbose", help="full debug echoing")
parser.add_option("--quiet", action="store_true", dest="quiet", help="be totally quiet")
@@ -75,9 +75,11 @@ def parse_argv():
opts = {'use_ansi':False}
elif DBTYPE == 'mssql':
db_uri = 'mssql://scott:tiger@SQUAWK\\SQLEXPRESS/test'
+ elif DBTYPE == 'firebird':
+ db_uri = 'firebird://sysdba:s@localhost/tmp/test.fdb'
if not db_uri:
- raise "Could not create engine. specify --db <sqlite|sqlite_file|postgres|mysql|oracle|oracle8|mssql> to test runner."
+ raise "Could not create engine. specify --db <sqlite|sqlite_file|postgres|mysql|oracle|oracle8|mssql|firebird> to test runner."
if not options.nothreadlocal:
__import__('sqlalchemy.mods.threadlocal')