summaryrefslogtreecommitdiff
path: root/test/engine/execute.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/engine/execute.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/engine/execute.py')
-rw-r--r--test/engine/execute.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/engine/execute.py b/test/engine/execute.py
index 6cf3cccd9..a79d18247 100644
--- a/test/engine/execute.py
+++ b/test/engine/execute.py
@@ -12,13 +12,13 @@ class ExecuteTest(PersistTest):
Column('user_name', VARCHAR(20)),
)
metadata.create_all()
-
+
def tearDown(self):
testbase.db.connect().execute(users.delete())
def tearDownAll(self):
metadata.drop_all()
-
- @testing.supported('sqlite', 'maxdb')
+
+ @testing.fails_on_everything_except('sqlite', 'maxdb')
def test_raw_qmark(self):
for conn in (testbase.db, testbase.db.connect()):
conn.execute("insert into users (user_id, user_name) values (?, ?)", (1,"jack"))
@@ -30,7 +30,8 @@ class ExecuteTest(PersistTest):
assert res.fetchall() == [(1, "jack"), (2, "fred"), (3, "ed"), (4, "horse"), (5, "barney"), (6, "donkey"), (7, 'sally')]
conn.execute("delete from users")
- @testing.supported('mysql', 'postgres')
+ @testing.fails_on_everything_except('mysql', 'postgres')
+ # some psycopg2 versions bomb this.
def test_raw_sprintf(self):
for conn in (testbase.db, testbase.db.connect()):
conn.execute("insert into users (user_id, user_name) values (%s, %s)", [1,"jack"])
@@ -43,7 +44,8 @@ class ExecuteTest(PersistTest):
# pyformat is supported for mysql, but skipping because a few driver
# versions have a bug that bombs out on this test. (1.2.2b3, 1.2.2c1, 1.2.2)
- @testing.supported('postgres')
+ @testing.unsupported('mysql')
+ @testing.fails_on_everything_except('postgres')
def test_raw_python(self):
for conn in (testbase.db, testbase.db.connect()):
conn.execute("insert into users (user_id, user_name) values (%(id)s, %(name)s)", {'id':1, 'name':'jack'})
@@ -53,7 +55,7 @@ class ExecuteTest(PersistTest):
assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally')]
conn.execute("delete from users")
- @testing.supported('sqlite')
+ @testing.fails_on_everything_except('sqlite')
def test_raw_named(self):
for conn in (testbase.db, testbase.db.connect()):
conn.execute("insert into users (user_id, user_name) values (:id, :name)", {'id':1, 'name':'jack'})
@@ -72,4 +74,4 @@ class ExecuteTest(PersistTest):
assert True
if __name__ == "__main__":
- testbase.main()
+ testbase.main()