summaryrefslogtreecommitdiff
path: root/test/sql/query.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-12-13 09:59:14 +0000
committerJason Kirtland <jek@discorporate.us>2007-12-13 09:59:14 +0000
commit8128a6378affeff76b573b1b4ca1e05e7d00b021 (patch)
treeb0d20234152eb56026d509ea4b205ed086bc742a /test/sql/query.py
parent2522534311452325513606d765ae398ce8514e2c (diff)
downloadsqlalchemy-8128a6378affeff76b573b1b4ca1e05e7d00b021.tar.gz
- Removed @testing.supported. Dialects in development or maintained outside
the tree can now run the full suite of tests out of the box. - Migrated most @supported to @fails_on, @fails_on_everything_but, or (last resort) @unsupported. @fails_on revealed a slew of bogus test skippage, which was corrected. - Added @fails_on_everything_but. Yes, the first usage *was* "fails_on_everything_but('postgres')". How did you guess! - Migrated @supported in dialect/* to the new test-class attribute __only_on__. - Test classes can also have __unsupported_on__ and __excluded_on__.
Diffstat (limited to 'test/sql/query.py')
-rw-r--r--test/sql/query.py68
1 files changed, 3 insertions, 65 deletions
diff --git a/test/sql/query.py b/test/sql/query.py
index 4979fecd7..d0b24a9cc 100644
--- a/test/sql/query.py
+++ b/test/sql/query.py
@@ -264,19 +264,11 @@ class QueryTest(PersistTest):
r = users.select(offset=5, order_by=[users.c.user_id]).execute().fetchall()
self.assert_(r==[(6, 'ralph'), (7, 'fido')])
- @testing.supported('mssql')
- @testing.fails_on('maxdb')
- def test_select_limit_nooffset(self):
- try:
- r = users.select(limit=3, offset=2, order_by=[users.c.user_id]).execute().fetchall()
- assert False # InvalidRequestError should have been raised
- except exceptions.InvalidRequestError:
- pass
-
- @testing.unsupported('mysql')
+ @testing.exclude('mysql', '<', (5, 0, 0))
def test_scalar_select(self):
"""test that scalar subqueries with labels get their type propigated to the result set."""
- # mysql and/or mysqldb has a bug here, type isnt propigated for scalar subquery.
+ # mysql and/or mysqldb has a bug here, type isn't propagated for scalar
+ # subquery.
datetable = Table('datetable', metadata,
Column('id', Integer, primary_key=True),
Column('today', DateTime))
@@ -482,60 +474,6 @@ class QueryTest(PersistTest):
finally:
shadowed.drop(checkfirst=True)
- @testing.supported('mssql')
- def test_fetchid_trigger(self):
- meta = MetaData(testbase.db)
- t1 = Table('t1', meta,
- Column('id', Integer, Sequence('fred', 100, 1), primary_key=True),
- Column('descr', String(200)))
- t2 = Table('t2', meta,
- Column('id', Integer, Sequence('fred', 200, 1), primary_key=True),
- Column('descr', String(200)))
- meta.create_all()
- con = testbase.db.connect()
- con.execute("""create trigger paj on t1 for insert as
- insert into t2 (descr) select descr from inserted""")
-
- try:
- tr = con.begin()
- r = con.execute(t2.insert(), descr='hello')
- self.assert_(r.last_inserted_ids() == [200])
- r = con.execute(t1.insert(), descr='hello')
- self.assert_(r.last_inserted_ids() == [100])
-
- finally:
- tr.commit()
- con.execute("""drop trigger paj""")
- meta.drop_all()
-
- @testing.supported('mssql')
- def test_insertid_schema(self):
- meta = MetaData(testbase.db)
- con = testbase.db.connect()
- con.execute('create schema paj')
- tbl = Table('test', meta, Column('id', Integer, primary_key=True), schema='paj')
- tbl.create()
- try:
- tbl.insert().execute({'id':1})
- finally:
- tbl.drop()
- con.execute('drop schema paj')
-
- @testing.supported('mssql')
- def test_insertid_reserved(self):
- meta = MetaData(testbase.db)
- table = Table(
- 'select', meta,
- Column('col', Integer, primary_key=True)
- )
- table.create()
-
- meta2 = MetaData(testbase.db)
- try:
- table.insert().execute(col=7)
- finally:
- table.drop()
-
@testing.fails_on('maxdb')
def test_in_filtering(self):
"""test the behavior of the in_() function."""