Commits

Anonymous committed e1ff3a2

convert @decorators to old-style function calls for python 2.3's benefit

  • Participants
  • Parent commits 2acf45f
  • Branches rel_0_4

Comments (0)

Files changed (53)

File test/dialect/mysql.py

             raise
         numeric_table.drop()
 
-    @testing.exclude('mysql', '<', (4, 1, 1))
     def test_charset(self):
         """Exercise CHARACTER SET and COLLATE-ish options on string types."""
 
         except:
             raise
         charset_table.drop()
+    test_charset = testing.exclude('mysql', '<', (4, 1, 1))(test_charset)
 
-    @testing.exclude('mysql', '<', (5, 0, 5))
     def test_bit_50(self):
         """Exercise BIT types on 5.0+ (not valid for all engine types)"""
 
                 roundtrip([0, 0, 0, 0, 0, 0, 0, i])
         finally:
             meta.drop_all()
+    test_bit_50 = testing.exclude('mysql', '<', (5, 0, 5))(test_bit_50)
 
     def test_boolean(self):
         """Test BOOL/TINYINT(1) compatability and reflection."""
         finally:
             meta.drop_all()
 
-    @testing.exclude('mysql', '<', (4, 1, 0))
     def test_timestamp(self):
         """Exercise funky TIMESTAMP default syntax."""
 
                     self.assert_(r.c.t is not None)
         finally:
             meta.drop_all()
+    test_timestamp = testing.exclude('mysql', '<', (4, 1, 0))(test_timestamp)
 
     def test_year(self):
         """Exercise YEAR."""
         self.assert_eq(res, expected)
         enum_table.drop()
 
-    @testing.exclude('mysql', '>', (3))
     def test_enum_parse(self):
         """More exercises for the ENUM type."""
 
                 assert t.c.e5.type.enums == ["", "'a'", "b'b", "'"]
         finally:
             enum_table.drop()
+    test_enum_parse = testing.exclude('mysql', '>', (3))(test_enum_parse)
 
     def test_default_reflection(self):
         """Test reflection of column defaults."""
         finally:
             def_table.drop()
 
-    @testing.exclude('mysql', '<', (5, 0, 0))
-    @testing.uses_deprecated('Using String type with no length')
     def test_type_reflection(self):
         # (ask_for, roundtripped_as_if_different)
         specs = [( String(), mysql.MSText(), ),
                 db.execute('DROP VIEW mysql_types_v')
         finally:
             m.drop_all()
+    test_type_reflection = testing.uses_deprecated('Using String type with no length')(test_type_reflection)
+    test_type_reflection = testing.exclude('mysql', '<', (5, 0, 0))(test_type_reflection)
 
     def test_autoincrement(self):
         meta = MetaData(testing.db)

File test/dialect/postgres.py

 class ReturningTest(TestBase, AssertsExecutionResults):
     __only_on__ = 'postgres'
 
-    @testing.exclude('postgres', '<', (8, 2))
     def test_update_returning(self):
         meta = MetaData(testing.db)
         table = Table('tables', meta,
             self.assertEqual(result2.fetchall(), [(1,True),(2,False)])
         finally:
             table.drop()
+    test_update_returning = testing.exclude('postgres', '<', (8, 2))(test_update_returning)
 
-    @testing.exclude('postgres', '<', (8, 2))
     def test_insert_returning(self):
         meta = MetaData(testing.db)
         table = Table('tables', meta,
             self.assertEqual([dict(row) for row in result4], [{'persons': 10}])
         finally:
             table.drop()
+    test_insert_returning = testing.exclude('postgres', '<', (8, 2))(test_insert_returning)
 
 
 class InsertTest(TestBase, AssertsExecutionResults):

File test/dialect/sqlite.py

         self.assertEquals(rp(bp(dt)), dt)
         
         
-    @testing.uses_deprecated('Using String type with no length')
     def test_type_reflection(self):
         # (ask_for, roundtripped_as_if_different)
         specs = [( String(), sqlite.SLText(), ),
                 db.execute('DROP VIEW types_v')
         finally:
             m.drop_all()
+    test_type_reflection = testing.uses_deprecated('Using String type with no length')(test_type_reflection)
 
 class DialectTest(TestBase, AssertsExecutionResults):
     __only_on__ = 'sqlite'
         finally:
             cx.execute('DETACH DATABASE alt_schema')
 
-    @testing.exclude('sqlite', '<', (2, 6))
     def test_temp_table_reflection(self):
         cx = testing.db.connect()
         try:
             except exceptions.DBAPIError:
                 pass
             raise
+    test_temp_table_reflection = testing.exclude('sqlite', '<', (2, 6))(test_temp_table_reflection)
 
 class InsertTest(TestBase, AssertsExecutionResults):
     """Tests inserts and autoincrement."""
         finally:
             table.drop()
 
-    @testing.exclude('sqlite', '<', (3, 4))
     def test_empty_insert_pk1(self):
         self._test_empty_insert(
             Table('a', MetaData(testing.db),
                   Column('id', Integer, primary_key=True)))
+    test_empty_insert_pk1 = testing.exclude('sqlite', '<', (3, 4))(test_empty_insert_pk1)
 
-    @testing.exclude('sqlite', '<', (3, 4))
     def test_empty_insert_pk2(self):
         self.assertRaises(
             exceptions.DBAPIError,
             Table('b', MetaData(testing.db),
                   Column('x', Integer, primary_key=True),
                   Column('y', Integer, primary_key=True)))
+    test_empty_insert_pk2 = testing.exclude('sqlite', '<', (3, 4))(test_empty_insert_pk2)
 
-    @testing.exclude('sqlite', '<', (3, 4))
     def test_empty_insert_pk3(self):
         self.assertRaises(
             exceptions.DBAPIError,
                   Column('x', Integer, primary_key=True),
                   Column('y', Integer, PassiveDefault('123'),
                          primary_key=True)))
+    test_empty_insert_pk3 = testing.exclude('sqlite', '<', (3, 4))(test_empty_insert_pk3)
 
-    @testing.exclude('sqlite', '<', (3, 4))
     def test_empty_insert_pk4(self):
         self._test_empty_insert(
             Table('d', MetaData(testing.db),
                   Column('x', Integer, primary_key=True),
                   Column('y', Integer, PassiveDefault('123'))))
+    test_empty_insert_pk4 = testing.exclude('sqlite', '<', (3, 4))(test_empty_insert_pk4)
 
-    @testing.exclude('sqlite', '<', (3, 4))
     def test_empty_insert_nopk1(self):
         self._test_empty_insert(
             Table('e', MetaData(testing.db),
                   Column('id', Integer)))
+    test_empty_insert_nopk1 = testing.exclude('sqlite', '<', (3, 4))(test_empty_insert_nopk1)
 
-    @testing.exclude('sqlite', '<', (3, 4))
     def test_empty_insert_nopk2(self):
         self._test_empty_insert(
             Table('f', MetaData(testing.db),
                   Column('x', Integer),
                   Column('y', Integer)))
+    test_empty_insert_nopk2 = testing.exclude('sqlite', '<', (3, 4))(test_empty_insert_nopk2)
 
     def test_inserts_with_spaces(self):
         tbl = Table('tbl', MetaData('sqlite:///'),

File test/engine/bind.py

                     "assign this Table's .metadata.bind to enable implicit "
                     "execution.")
 
-    @testing.future
     def test_create_drop_err2(self):
         for meth in [
             table.exists,
                     "against.  Either execute with an explicit connection or "
                     "assign this Table's .metadata.bind to enable implicit "
                     "execution.")
+    test_create_drop_err2 = testing.future(test_create_drop_err2)
 
-    @testing.uses_deprecated('//connect')
     def test_create_drop_bound(self):
 
         for meta in (MetaData,ThreadLocalMetaData):
                 assert not table.exists()
                 if isinstance(bind, engine.Connection):
                     bind.close()
+    test_create_drop_bound = testing.uses_deprecated('//connect')(test_create_drop_bound)
 
     def test_create_drop_constructor_bound(self):
         for bind in (

File test/engine/ddlevents.py

         metadata.drop_all(bind)
         assert canary.state == 'after-create'
 
-    @testing.future
     def test_metadata_table_isolation(self):
         metadata, table, bind = self.metadata, self.table, self.bind
 
         # path that metadata.create_all() does
         self.table.create(self.bind)
         assert metadata_canary.state == None
+    test_metadata_table_isolation = testing.future(test_metadata_table_isolation)
 
     def test_append_listener(self):
         metadata, table, bind = self.metadata, self.table, self.bind

File test/engine/execute.py

     def tearDownAll(self):
         metadata.drop_all()
 
-    @testing.fails_on_everything_except('firebird', 'maxdb', 'sqlite')
     def test_raw_qmark(self):
         for conn in (testing.db, testing.db.connect()):
             conn.execute("insert into users (user_id, user_name) values (?, ?)", (1,"jack"))
             res = conn.execute("select * from users order by user_id")
             assert res.fetchall() == [(1, "jack"), (2, "fred"), (3, "ed"), (4, "horse"), (5, "barney"), (6, "donkey"), (7, 'sally')]
             conn.execute("delete from users")
+    test_raw_qmark = testing.fails_on_everything_except('firebird', 'maxdb', 'sqlite')(test_raw_qmark)
 
-    @testing.fails_on_everything_except('mysql', 'postgres')
     # some psycopg2 versions bomb this.
     def test_raw_sprintf(self):
         for conn in (testing.db, testing.db.connect()):
             res = conn.execute("select * from users order by user_id")
             assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally'), (5, None)]
             conn.execute("delete from users")
+    test_raw_sprintf = testing.fails_on_everything_except('mysql', 'postgres')(test_raw_sprintf)
 
     # 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.unsupported('mysql')
-    @testing.fails_on_everything_except('postgres')
     def test_raw_python(self):
         for conn in (testing.db, testing.db.connect()):
             conn.execute("insert into users (user_id, user_name) values (%(id)s, %(name)s)", {'id':1, 'name':'jack'})
             res = conn.execute("select * from users order by user_id")
             assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally')]
             conn.execute("delete from users")
+    test_raw_python = testing.fails_on_everything_except('postgres')(test_raw_python)
+    test_raw_python = testing.unsupported('mysql')(test_raw_python)
 
-    @testing.fails_on_everything_except('sqlite', 'oracle')
     def test_raw_named(self):
         for conn in (testing.db, testing.db.connect()):
             conn.execute("insert into users (user_id, user_name) values (:id, :name)", {'id':1, 'name':'jack'})
             res = conn.execute("select * from users order by user_id")
             assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally')]
             conn.execute("delete from users")
+    test_raw_named = testing.fails_on_everything_except('sqlite', 'oracle')(test_raw_named)
 
     def test_exception_wrapping(self):
         for conn in (testing.db, testing.db.connect()):

File test/engine/metadata.py

         finally:
             metadata.drop_all()
 
-    @testing.exclude('mysql', '<', (4, 1, 1))
     def test_to_metadata(self):
         meta = MetaData()
 
                     assert not c.columns.contains_column(table.c.name)
         finally:
             meta.drop_all(testing.db)
+    test_to_metadata = testing.exclude('mysql', '<', (4, 1, 1))(test_to_metadata)
 
     def test_nonexistent(self):
         self.assertRaises(exceptions.NoSuchTableError, Table,

File test/engine/reconnect.py

         meta.drop_all()
         engine.dispose()
     
-    @testing.fails_on('mysql')    
     def test_invalidate_on_results(self):
         conn = engine.connect()
         
                 raise
 
         assert conn.invalidated
+    test_invalidate_on_results = testing.fails_on('mysql')    (test_invalidate_on_results)
         
 if __name__ == '__main__':
     testenv.main()

File test/engine/reflection.py

 
 class ReflectionTest(TestBase, ComparesTables):
 
-    @testing.exclude('mysql', '<', (4, 1, 1))
     def test_basic_reflection(self):
         meta = MetaData(testing.db)
 
         finally:
             addresses.drop()
             users.drop()
+    test_basic_reflection = testing.exclude('mysql', '<', (4, 1, 1))(test_basic_reflection)
 
     def test_include_columns(self):
         meta = MetaData(testing.db)
             except exceptions.SAWarning:
                 assert True
 
-            @testing.emits_warning('Did not recognize type')
             def warns():
                 m3 = MetaData(testing.db)
                 t3 = Table("test", m3, autoload=True)
                 assert t3.c.foo.type.__class__ == sqltypes.NullType
+            warns = testing.emits_warning('Did not recognize type')(warns)
 
         finally:
             dialect_module.ischema_names = ischema_names
         finally:
             testing.db.execute("drop table book")
 
-    @testing.exclude('mysql', '<', (4, 1, 1))
     def test_composite_fk(self):
         """test reflection of composite foreign keys"""
 
             self.assert_(and_(table.c.multi_id==table2.c.foo, table.c.multi_rev==table2.c.bar, table.c.multi_hoho==table2.c.lala).compare(j.onclause))
         finally:
             meta.drop_all()
+    test_composite_fk = testing.exclude('mysql', '<', (4, 1, 1))(test_composite_fk)
 
 
-    @testing.unsupported('oracle')
     def testreserved(self):
         # check a table that uses an SQL reserved name doesn't cause an error
         meta = MetaData(testing.db)
             table_c2 = Table('is', meta2, autoload=True)
         finally:
             meta.drop_all()
+    testreserved = testing.unsupported('oracle')(testreserved)
 
     def test_reflect_all(self):
         existing = testing.db.table_names()
         finally:
             metadata.drop_all(bind=testing.db)
 
-    @testing.exclude('mysql', '<', (4, 1, 1))
     def test_createdrop(self):
         metadata.create_all(bind=testing.db)
         self.assertEqual( testing.db.has_table('items'), True )
         self.assertEqual( testing.db.has_table('email_addresses'), False )
         metadata.drop_all(bind=testing.db)
         self.assertEqual( testing.db.has_table('items'), False )
+    test_createdrop = testing.exclude('mysql', '<', (4, 1, 1))(test_createdrop)
 
     def test_tablenames(self):
         from sqlalchemy.util import Set
             assert buf.index("CREATE TABLE someschema.table1") > -1
             assert buf.index("CREATE TABLE someschema.table2") > -1
 
-    @testing.unsupported('sqlite', 'firebird')
-    # fixme: revisit these below.
-    @testing.fails_on('mssql', 'sybase', 'access')
     def test_explicit_default_schema(self):
         engine = testing.db
 
             table2 = Table('table2', metadata, autoload=True, schema=schema)
         finally:
             metadata.drop_all()
+    test_explicit_default_schema = testing.fails_on('mssql', 'sybase', 'access')(test_explicit_default_schema)
+    # fixme: revisit these below.
+    test_explicit_default_schema = testing.unsupported('sqlite', 'firebird')(test_explicit_default_schema)
 
 
 class HasSequenceTest(TestBase):
                       Column('user_name', String(40)),
                       )
 
-    @testing.unsupported('sqlite', 'mysql', 'mssql', 'access', 'sybase')
     def test_hassequence(self):
         metadata.create_all(bind=testing.db)
         self.assertEqual(testing.db.dialect.has_sequence(testing.db, 'user_id_seq'), True)
         metadata.drop_all(bind=testing.db)
         self.assertEqual(testing.db.dialect.has_sequence(testing.db, 'user_id_seq'), False)
+    test_hassequence = testing.unsupported('sqlite', 'mysql', 'mssql', 'access', 'sybase')(test_hassequence)
 
 
 if __name__ == "__main__":

File test/engine/transaction.py

         assert len(result.fetchall()) == 0
         connection.close()
 
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testnestedrollback(self):
         connection = testing.db.connect()
 
                 assert str(e) == 'uh oh'  # and not "This transaction is inactive"
             finally:
                 connection.close()
+    testnestedrollback = testing.exclude('mysql', '<', (5, 0, 3))(testnestedrollback)
 
 
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testnesting(self):
         connection = testing.db.connect()
         transaction = connection.begin()
         result = connection.execute("select * from query_users")
         assert len(result.fetchall()) == 0
         connection.close()
+    testnesting = testing.exclude('mysql', '<', (5, 0, 3))(testnesting)
 
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testclose(self):
         connection = testing.db.connect()
         transaction = connection.begin()
         result = connection.execute("select * from query_users")
         assert len(result.fetchall()) == 5
         connection.close()
+    testclose = testing.exclude('mysql', '<', (5, 0, 3))(testclose)
 
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testclose2(self):
         connection = testing.db.connect()
         transaction = connection.begin()
         result = connection.execute("select * from query_users")
         assert len(result.fetchall()) == 0
         connection.close()
+    testclose2 = testing.exclude('mysql', '<', (5, 0, 3))(testclose2)
 
 
-    @testing.unsupported('sqlite', 'mssql', 'sybase', 'access')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testnestedsubtransactionrollback(self):
         connection = testing.db.connect()
         transaction = connection.begin()
             [(1,),(3,)]
         )
         connection.close()
+    testnestedsubtransactionrollback = testing.exclude('mysql', '<', (5, 0, 3))(testnestedsubtransactionrollback)
+    testnestedsubtransactionrollback = testing.unsupported('sqlite', 'mssql', 'sybase', 'access')(testnestedsubtransactionrollback)
 
-    @testing.unsupported('sqlite', 'mssql', 'sybase', 'access')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testnestedsubtransactioncommit(self):
         connection = testing.db.connect()
         transaction = connection.begin()
             [(1,),(2,),(3,)]
         )
         connection.close()
+    testnestedsubtransactioncommit = testing.exclude('mysql', '<', (5, 0, 3))(testnestedsubtransactioncommit)
+    testnestedsubtransactioncommit = testing.unsupported('sqlite', 'mssql', 'sybase', 'access')(testnestedsubtransactioncommit)
 
-    @testing.unsupported('sqlite', 'mssql', 'sybase', 'access')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testrollbacktosubtransaction(self):
         connection = testing.db.connect()
         transaction = connection.begin()
             [(1,),(4,)]
         )
         connection.close()
+    testrollbacktosubtransaction = testing.exclude('mysql', '<', (5, 0, 3))(testrollbacktosubtransaction)
+    testrollbacktosubtransaction = testing.unsupported('sqlite', 'mssql', 'sybase', 'access')(testrollbacktosubtransaction)
 
-    @testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access',
-                         'oracle', 'maxdb')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testtwophasetransaction(self):
         connection = testing.db.connect()
 
             [(1,),(2,)]
         )
         connection.close()
+    testtwophasetransaction = testing.exclude('mysql', '<', (5, 0, 3))(testtwophasetransaction)
+    testtwophasetransaction = testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access', 'oracle', 'maxdb')(testtwophasetransaction)
 
-    @testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access',
-                         'oracle', 'maxdb')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testmixedtwophasetransaction(self):
         connection = testing.db.connect()
 
             [(1,),(2,),(5,)]
         )
         connection.close()
+    testmixedtwophasetransaction = testing.exclude('mysql', '<', (5, 0, 3))(testmixedtwophasetransaction)
+    testmixedtwophasetransaction = testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access', 'oracle', 'maxdb')(testmixedtwophasetransaction)
 
-    @testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access',
-                         'oracle', 'maxdb')
-    # fixme: see if this is still true and/or can be convert to fails_on()
-    @testing.unsupported('mysql')
     def testtwophaserecover(self):
         # MySQL recovery doesn't currently seem to work correctly
         # Prepared transactions disappear when connections are closed and even
             [(1,)]
         )
         connection2.close()
+    testtwophaserecover = testing.unsupported('mysql')(testtwophaserecover)
+    # fixme: see if this is still true and/or can be convert to fails_on()
+    testtwophaserecover = testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access', 'oracle', 'maxdb')(testtwophaserecover)
 
-    @testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access',
-                         'oracle', 'maxdb')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testmultipletwophase(self):
         conn = testing.db.connect()
 
         self.assertEqual(result.fetchall(), [('user1',),('user4',)])
 
         conn.close()
+    testmultipletwophase = testing.exclude('mysql', '<', (5, 0, 3))(testmultipletwophase)
+    testmultipletwophase = testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access', 'oracle', 'maxdb')(testmultipletwophase)
 
 class AutoRollbackTest(TestBase):
     def setUpAll(self):
     def tearDownAll(self):
         metadata.drop_all(testing.db)
 
-    @testing.unsupported('sqlite')
     def testrollback_deadlock(self):
         """test that returning connections to the pool clears any object locks."""
         conn1 = testing.db.connect()
         # comment out the rollback in pool/ConnectionFairy._close() to see !
         users.drop(conn2)
         conn2.close()
+    testrollback_deadlock = testing.unsupported('sqlite')(testrollback_deadlock)
 
 class ExplicitAutoCommitTest(TestBase):
     """test the 'autocommit' flag on select() and text() objects.  
         finally:
             external_connection.close()
 
-    @testing.unsupported('sqlite')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testnesting(self):
         """tests nesting of transactions"""
         external_connection = tlengine.connect()
             self.assert_(external_connection.scalar("select count(1) from query_users") == 0)
         finally:
             external_connection.close()
+    testnesting = testing.exclude('mysql', '<', (5, 0, 3))(testnesting)
+    testnesting = testing.unsupported('sqlite')(testnesting)
 
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testmixednesting(self):
         """tests nesting of transactions off the TLEngine directly inside of
         tranasctions off the connection from the TLEngine"""
             self.assert_(external_connection.scalar("select count(1) from query_users") == 0)
         finally:
             external_connection.close()
+    testmixednesting = testing.exclude('mysql', '<', (5, 0, 3))(testmixednesting)
 
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testmoremixednesting(self):
         """tests nesting of transactions off the connection from the TLEngine
         inside of tranasctions off thbe TLEngine directly."""
             self.assert_(external_connection.scalar("select count(1) from query_users") == 0)
         finally:
             external_connection.close()
+    testmoremixednesting = testing.exclude('mysql', '<', (5, 0, 3))(testmoremixednesting)
 
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testsessionnesting(self):
         class User(object):
             pass
             tlengine.commit()
         finally:
             clear_mappers()
+    testsessionnesting = testing.exclude('mysql', '<', (5, 0, 3))(testsessionnesting)
 
 
     def testconnections(self):
         c2.close()
         assert c1.connection.connection is not None
 
-    @testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access',
-                         'oracle', 'maxdb')
-    @testing.exclude('mysql', '<', (5, 0, 3))
     def testtwophasetransaction(self):
         tlengine.begin_twophase()
         tlengine.execute(users.insert(), user_id=1, user_name='user1')
             tlengine.execute(select([users.c.user_id]).order_by(users.c.user_id)).fetchall(),
             [(1,),(2,)]
         )
+    testtwophasetransaction = testing.exclude('mysql', '<', (5, 0, 3))(testtwophasetransaction)
+    testtwophasetransaction = testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access', 'oracle', 'maxdb')(testtwophasetransaction)
 
 class ForUpdateTest(TestBase):
     def setUpAll(self):
                 break
         con.close()
 
-    @testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access')
-
     def testqueued_update(self):
         """Test SELECT FOR UPDATE with concurrent modifications.
 
         sel = counters.select(whereclause=counters.c.counter_id==1)
         final = db.execute(sel).fetchone()
         self.assert_(final['counter_value'] == iterations * thread_count)
+    testqueued_update = testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access')(testqueued_update)
 
     def overlap(self, ids, errors, update_style):
         sel = counters.select(for_update=update_style,
 
         return errors
 
-    @testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access')
     def testqueued_select(self):
         """Simple SELECT FOR UPDATE conflict test"""
 
         for e in errors:
             sys.stderr.write("Failure: %s\n" % e)
         self.assert_(len(errors) == 0)
+    testqueued_select = testing.unsupported('sqlite', 'mssql', 'firebird', 'sybase', 'access')(testqueued_select)
 
-    @testing.unsupported('sqlite', 'mysql', 'mssql', 'firebird',
-                         'sybase', 'access')
     def testnowait_select(self):
         """Simple SELECT FOR UPDATE NOWAIT conflict test"""
 
         errors = self._threaded_overlap(2, [(1,2,3),(3,4,5)],
                                         update_style='nowait')
         self.assert_(len(errors) != 0)
+    testnowait_select = testing.unsupported('sqlite', 'mysql', 'mssql', 'firebird', 'sybase', 'access')(testnowait_select)
 
 
 if __name__ == "__main__":

File test/ext/activemapper.py

         self.assertEquals(len(person.addresses), 2)
         self.assertEquals(person.addresses[0].postal_code, '30338')
 
-    @testing.unsupported('mysql')
     def test_update(self):
         p1 = self.create_person_one()
         objectstore.flush()
                 assert False
         except exceptions.ConcurrentModificationError:
             pass
+    test_update = testing.unsupported('mysql')(test_update)
 
 
     def test_delete(self):

File test/ext/assignmapper.py

             )
         metadata.create_all()
 
-    @testing.uses_deprecated('SessionContext', 'assign_mapper')
     def setUp(self):
         global SomeObject, SomeOtherObject, ctx
         class SomeObject(object):pass
         s.options.append(sso)
         ctx.current.flush()
         ctx.current.clear()
+    setUp = testing.uses_deprecated('SessionContext', 'assign_mapper')(setUp)
 
     def tearDownAll(self):
         metadata.drop_all()
             table.delete().execute()
         clear_mappers()
 
-    @testing.uses_deprecated('assign_mapper')
     def test_override_attributes(self):
 
         sso = SomeOtherObject.query().first()
             assert False
         except exceptions.ArgumentError:
             pass
+    test_override_attributes = testing.uses_deprecated('assign_mapper')(test_override_attributes)
 
-    @testing.uses_deprecated('assign_mapper')
     def test_dont_clobber_methods(self):
         class MyClass(object):
             def expunge(self):
         assign_mapper(ctx, MyClass, table2)
 
         assert MyClass().expunge() == "an expunge !"
+    test_dont_clobber_methods = testing.uses_deprecated('assign_mapper')(test_dont_clobber_methods)
 
 
 if __name__ == '__main__':

File test/ext/associationproxy.py

 
 
 class DictCollection(dict):
-    @collection.appender
     def append(self, obj):
         self[obj.foo] = obj
-    @collection.remover
+    append = collection.appender(append)
     def remove(self, obj):
         del self[obj.foo]
+    remove = collection.remover(remove)
 
 class SetCollection(set):
     pass
 class ObjectCollection(object):
     def __init__(self):
         self.values = list()
-    @collection.appender
     def append(self, obj):
         self.values.append(obj)
-    @collection.remover
+    append = collection.appender(append)
     def remove(self, obj):
         self.values.remove(obj)
+    remove = collection.remover(remove)
     def __iter__(self):
         return iter(self.values)
 

File test/ext/declarative.py

             assert Foo.__mapper__.compile().extension.create_instance() == 'CHECK'
 
 
-    @testing.emits_warning('Ignoring declarative-like tuple value of '
-                           'attribute id')
     def test_oops(self):
         def define():
             class User(Base, Fixture):
             exceptions.ArgumentError,
             "Mapper Mapper|User|users could not assemble any primary key",
             define)
+    test_oops = testing.emits_warning('Ignoring declarative-like tuple value of attribute id')(test_oops)
 
     def test_expression(self):
         class User(Base, Fixture):
         sess.flush()
         self.assertEquals(sess.query(User).filter(User.name=="SOMENAME someuser").one(), u1)
 
-    @testing.uses_deprecated('Call to deprecated function declared_synonym')
     def test_decl_synonym_inline(self):
         class User(Base, Fixture):
             __tablename__ = 'users'
         sess.save(u1)
         sess.flush()
         self.assertEquals(sess.query(User).filter(User.name=="SOMENAME someuser").one(), u1)
+    test_decl_synonym_inline = testing.uses_deprecated('Call to deprecated function declared_synonym')(test_decl_synonym_inline)
 
     def test_synonym_added(self):
         class User(Base, Fixture):
         sess.flush()
         self.assertEquals(sess.query(User).filter(User.name=="SOMENAME someuser").one(), u1)
 
-    @testing.uses_deprecated('Call to deprecated function declared_synonym')
     def test_decl_synonym_added(self):
         class User(Base, Fixture):
             __tablename__ = 'users'
         sess.save(u1)
         sess.flush()
         self.assertEquals(sess.query(User).filter(User.name=="SOMENAME someuser").one(), u1)
+    test_decl_synonym_added = testing.uses_deprecated('Call to deprecated function declared_synonym')(test_decl_synonym_added)
 
     def test_joined_inheritance(self):
         class Company(Base, Fixture):
             id = Column('id', Integer, primary_key=True)
             name = Column('name', String(50))
 
-            @synonym_for('name')
-            @property
             def namesyn(self):
                 return self.name
+            namesyn = property(namesyn)
+            namesyn = synonym_for('name')(namesyn)
 
         Base.metadata.create_all()
 
 
     def test_comparable_using(self):
         class NameComparator(PropComparator):
-            @property
             def upperself(self):
                 cls = self.prop.parent.class_
                 col = getattr(cls, 'name')
                 return func.upper(col)
+            upperself = property(upperself)
 
             def operate(self, op, other, **kw):
                 return op(self.upperself, other, **kw)
             id = Column('id', Integer, primary_key=True)
             name = Column('name', String(50))
 
-            @comparable_using(NameComparator)
-            @property
             def uc_name(self):
                 return self.name is not None and self.name.upper() or None
+            uc_name = property(uc_name)
+            uc_name = comparable_using(NameComparator)(uc_name)
 
         Base.metadata.create_all()
 

File test/orm/association.py

 from testlib import *
 
 class AssociationTest(TestBase):
-    @testing.uses_deprecated('association option')
     def setUpAll(self):
         global items, item_keywords, keywords, metadata, Item, Keyword, KeywordAssociation
         metadata = MetaData(testing.db)
         mapper(Item, items, properties={
             'keywords' : relation(KeywordAssociation, association=Keyword)
         })
+    setUpAll = testing.uses_deprecated('association option')(setUpAll)
 
     def tearDown(self):
         for t in metadata.table_iterator(reverse=True):
         print loaded
         self.assert_(saved == loaded)
 
-    @testing.uses_deprecated('association option')
     def testdelete(self):
         sess = create_session()
         item1 = Item('item1')
         sess.delete(item2)
         sess.flush()
         self.assert_(item_keywords.count().scalar() == 0)
+    testdelete = testing.uses_deprecated('association option')(testdelete)
 
 class AssociationTest2(TestBase):
     def setUpAll(self):

File test/orm/assorted_eager.py

         print result
         assert result == [u'1 Some Category', u'3 Some Category']
 
-    @testing.uses_deprecated('//select')
     def test_withouteagerload_deprecated(self):
         s = create_session()
         l=s.query(Test).select ( and_(tests.c.owner_id==1,or_(options.c.someoption==None,options.c.someoption==False)),
         result = ["%d %s" % ( t.id,t.category.name ) for t in l]
         print result
         assert result == [u'1 Some Category', u'3 Some Category']
+    test_withouteagerload_deprecated = testing.uses_deprecated('//select')(test_withouteagerload_deprecated)
 
     def test_witheagerload(self):
         """test that an eagerload locates the correct "from" clause with
         print result
         assert result == [u'1 Some Category', u'3 Some Category']
 
-    @testing.uses_deprecated('//select')
     def test_witheagerload_deprecated(self):
         """As test_witheagerload, but via select()."""
         s = create_session()
         result = ["%d %s" % ( t.id,t.category.name ) for t in l]
         print result
         assert result == [u'1 Some Category', u'3 Some Category']
+    test_witheagerload_deprecated = testing.uses_deprecated('//select')(test_witheagerload_deprecated)
 
     def test_dslish(self):
         """test the same as witheagerload except using generative"""
         print result
         assert result == [u'1 Some Category', u'3 Some Category']
 
-    @testing.unsupported('sybase')
     def test_withoutouterjoin_literal(self):
         s = create_session()
         q = s.query(Test).options(eagerload('category'))
         result = ["%d %s" % ( t.id,t.category.name ) for t in l]
         print result
         assert result == [u'3 Some Category']
+    test_withoutouterjoin_literal = testing.unsupported('sybase')(test_withoutouterjoin_literal)
 
-    @testing.unsupported('sybase')
-    @testing.uses_deprecated('//select', '//join_to')
     def test_withoutouterjoin_literal_deprecated(self):
         s = create_session()
         q=s.query(Test).options(eagerload('category'))
         result = ["%d %s" % ( t.id,t.category.name ) for t in l]
         print result
         assert result == [u'3 Some Category']
+    test_withoutouterjoin_literal_deprecated = testing.uses_deprecated('//select', '//join_to')(test_withoutouterjoin_literal_deprecated)
+    test_withoutouterjoin_literal_deprecated = testing.unsupported('sybase')(test_withoutouterjoin_literal_deprecated)
 
     def test_withoutouterjoin(self):
         s = create_session()
         print result
         assert result == [u'3 Some Category']
 
-    @testing.uses_deprecated('//select', '//join_to', '//join_via')
     def test_withoutouterjoin_deprecated(self):
         s = create_session()
         q=s.query(Test).options(eagerload('category'))
         result = ["%d %s" % ( t.id,t.category.name ) for t in l]
         print result
         assert result == [u'3 Some Category']
+    test_withoutouterjoin_deprecated = testing.uses_deprecated('//select', '//join_to', '//join_via')(test_withoutouterjoin_deprecated)
 
 class EagerTest2(TestBase, AssertsExecutionResults):
     def setUpAll(self):
         for t in metadata.table_iterator(reverse=True):
             t.delete().execute()
 
-    @testing.fails_on('maxdb')
     def testeagerterminate(self):
         """test that eager query generation does not include the same mapper's table twice.
 
         session.clear()
         obj = session.query(Left).filter_by(tag='tag1').one()
         print obj.middle.right[0]
+    testeagerterminate = testing.fails_on('maxdb')(testeagerterminate)
 
 class EagerTest3(ORMTest):
     """test eager loading combined with nested SELECT statements, functions, and aggregates"""
         Column ( 'data_id', Integer, ForeignKey('datas.id')),
         Column ( 'somedata', Integer, nullable=False ))
 
-    @testing.fails_on('maxdb')
     def test_nesting_with_functions(self):
         class Data(object): pass
         class Foo(object):pass
         # assert equality including ordering (may break if the DB "ORDER BY" and python's sort() used differing
         # algorithms and there are repeated 'somedata' values in the list)
         assert verify_result == arb_result
+    test_nesting_with_functions = testing.fails_on('maxdb')(test_nesting_with_functions)
 
 class EagerTest4(ORMTest):
     def define_tables(self, metadata):
                           Column('department_id', Integer,
                                  ForeignKey('departments.department_id')))
 
-    @testing.fails_on('maxdb')
     def test_basic(self):
         class Department(object):
             def __init__(self, **kwargs):
         q = q.join('employees').filter(Employee.c.name.startswith('J')).distinct().order_by([desc(Department.c.name)])
         assert q.count() == 2
         assert q[0] is d2
+    test_basic = testing.fails_on('maxdb')(test_basic)
 
 class EagerTest5(ORMTest):
     """test the construction of AliasedClauses for the same eager load property but different
         x.inheritedParts
 
 class EagerTest7(ORMTest):
-    @testing.uses_deprecated('SessionContext')
     def define_tables(self, metadata):
         global companies_table, addresses_table, invoice_table, phones_table, items_table, ctx
         global Company, Address, Phone, Item,Invoice
         class Item(object):
             def __repr__(self):
                 return "Item: " + repr(getattr(self, 'item_id', None)) + " " + repr(getattr(self, 'invoice_id', None)) + " " + repr(self.code) + " " + repr(self.qty)
+    define_tables = testing.uses_deprecated('SessionContext')(define_tables)
 
-    @testing.uses_deprecated('SessionContext')
     def testone(self):
         """tests eager load of a many-to-one attached to a one-to-many.  this testcase illustrated
         the bug, which is that when the single Company is loaded, no further processing of the rows
         print repr(c)
         print repr(i.company)
         self.assert_(repr(c) == repr(i.company))
+    testone = testing.uses_deprecated('SessionContext')(testone)
 
     def testtwo(self):
         """this is the original testcase that includes various complicating factors"""
         testing.db.execute(task_type_t.insert(), {'id':1})
         testing.db.execute(task_t.insert(), {'title':u'task 1', 'task_type_id':1, 'status_id':1, 'prj_id':1})
 
-    @testing.fails_on('maxdb')
     def test_nested_joins(self):
         # this is testing some subtle column resolution stuff,
         # concerning corresponding_column() being extremely accurate
 
         for t in session.query(cls.mapper).limit(10).offset(0).all():
             print t.id, t.title, t.props_cnt
+    test_nested_joins = testing.fails_on('maxdb')(test_nested_joins)
 
 class EagerTest9(ORMTest):
     """test the usage of query options to eagerly load specific paths.
             Column('transaction_id', Integer, ForeignKey(transactions_table.c.transaction_id)),
         )
 
-    @testing.fails_on('maxdb')
     def test_eagerload_on_path(self):
         class Account(fixtures.Base):
             pass
                 assert e.account is acc
 
         self.assert_sql_count(testing.db, go, 1)
+    test_eagerload_on_path = testing.fails_on('maxdb')(test_eagerload_on_path)
 
 
 

File test/orm/attributes.py

             assert str(e) == "Type InstrumentedDict must elect an appender method to be a collection class"
 
         class MyDict(dict):
-            @collection.appender
             def append(self, item):
                 self[item.foo] = item
-            @collection.remover
+            append = collection.appender(append)
             def remove(self, item):
                 del self[item.foo]
+            remove = collection.remover(remove)
         attributes.register_attribute(Foo, "collection", uselist=True, typecallable=MyDict, useobject=True)
         assert isinstance(Foo().collection, MyDict)
 
             assert str(e) == "Type MyColl must elect an appender method to be a collection class"
 
         class MyColl(object):
-            @collection.iterator
             def __iter__(self):
                 return iter([])
-            @collection.appender
+            __iter__ = collection.iterator(__iter__)
             def append(self, item):
                 pass
-            @collection.remover
+            append = collection.appender(append)
             def remove(self, item):
                 pass
+            remove = collection.remover(remove)
         attributes.register_attribute(Foo, "collection", uselist=True, typecallable=MyColl, useobject=True)
         try:
             Foo().collection

File test/orm/cascade.py

         sess.flush()
         sess.close()
 
-    @testing.fails_on('maxdb')
     def test_orphan(self):
         sess = create_session()
         assert prefs.count().scalar() == 3
         sess.flush()
         assert prefs.count().scalar() == 2
         assert extra.count().scalar() == 2
+    test_orphan = testing.fails_on('maxdb')(test_orphan)
 
-    @testing.fails_on('maxdb')
     def test_orphan_on_update(self):
         sess = create_session()
         jack = sess.query(User).filter_by(name="jack").one()
         sess.flush()
         assert prefs.count().scalar() == 2
         assert extra.count().scalar() == 2
+    test_orphan_on_update = testing.fails_on('maxdb')(test_orphan_on_update)
     
     def test_pending_expunge(self):
         sess = create_session()
         self.assertEquals(sess.query(T2).all(), [T2()])
         self.assertEquals(sess.query(T3).all(), [T3()])
 
-    @testing.future
     def test_preserves_orphans_onelevel_postremove(self):
         sess = create_session()
 
         self.assertEquals(sess.query(T1).all(), [])
         self.assertEquals(sess.query(T2).all(), [T2()])
         self.assertEquals(sess.query(T3).all(), [T3()])
+    test_preserves_orphans_onelevel_postremove = testing.future(test_preserves_orphans_onelevel_postremove)
 
     def test_preserves_orphans_twolevel(self):
         sess = create_session()

File test/orm/collection.py

 
     def test_dict_subclass(self):
         class MyDict(dict):
-            @collection.appender
-            @collection.internally_instrumented
             def set(self, item, _sa_initiator=None):
                 self.__setitem__(item.a, item, _sa_initiator=_sa_initiator)
-            @collection.remover
-            @collection.internally_instrumented
+            set = collection.internally_instrumented(set)
+            set = collection.appender(set)
             def _remove(self, item, _sa_initiator=None):
                 self.__delitem__(item.a, _sa_initiator=_sa_initiator)
+            _remove = collection.internally_instrumented(_remove)
+            _remove = collection.remover(_remove)
 
         self._test_adapter(MyDict, dictable_entity,
                            to_set=lambda c: set(c.values()))
             def __init__(self):
                 self.data = dict()
 
-            @collection.appender
-            @collection.replaces(1)
             def set(self, item):
                 current = self.data.get(item.a, None)
                 self.data[item.a] = item
                 return current
-            @collection.remover
+            set = collection.appender(set)
+            set = collection.replaces(1)(set)
             def _remove(self, item):
                 del self.data[item.a]
+            _remove = collection.remover(_remove)
             def __setitem__(self, key, value):
                 self.data[key] = value
             def __getitem__(self, key):
                 return self.data.values()
             def __contains__(self, key):
                 return key in self.data
-            @collection.iterator
             def itervalues(self):
                 return self.data.itervalues()
+            itervalues = collection.iterator(itervalues)
             def __eq__(self, other):
                 return self.data == other
             def __repr__(self):
             def __init__(self):
                 self.data = dict()
 
-            @collection.appender
-            @collection.replaces(1)
             def set(self, item):
                 current = self.data.get(item.a, None)
                 self.data[item.a] = item
                 return current
-            @collection.remover
+            set = collection.replaces(1)(set)
+            set = collection.appender(set)
             def _remove(self, item):
                 del self.data[item.a]
+            _remove = collection.remover(_remove)
             def __setitem__(self, key, value):
                 self.data[key] = value
             def __getitem__(self, key):
                 return self.data.values()
             def __contains__(self, key):
                 return key in self.data
-            @collection.iterator
             def itervalues(self):
                 return self.data.itervalues()
+            itervalues = collection.iterator(itervalues)
             def __eq__(self, other):
                 return self.data == other
             def __repr__(self):
         class MyCollection(object):
             def __init__(self):
                 self.data = set()
-            @collection.appender
             def push(self, item):
                 self.data.add(item)
-            @collection.remover
+            push = collection.appender(push)
             def zark(self, item):
                 self.data.remove(item)
-            @collection.removes_return()
+            zark = collection.remover(zark)
             def maybe_zark(self, item):
                 if item in self.data:
                     self.data.remove(item)
                     return item
-            @collection.iterator
+            maybe_zark = collection.removes_return()(maybe_zark)
             def __iter__(self):
                 return iter(self.data)
+            __iter__ = collection.iterator(__iter__)
             def __eq__(self, other):
                 return self.data == other
 
             # looks like a list
             def append(self, item):
                 assert False
-            @collection.appender
             def push(self, item):
                 self.data.add(item)
-            @collection.remover
+            push = collection.appender(push)
             def zark(self, item):
                 self.data.remove(item)
-            @collection.removes_return()
+            zark = collection.remover(zark)
             def maybe_zark(self, item):
                 if item in self.data:
                     self.data.remove(item)
                     return item
-            @collection.iterator
+            maybe_zark = collection.removes_return()(maybe_zark)
             def __iter__(self):
                 return iter(self.data)
+            __iter__ = collection.iterator(__iter__)
             def __eq__(self, other):
                 return self.data == other
 
         class Custom(object):
             def __init__(self):
                 self.data = []
-            @collection.appender
-            @collection.adds('entity')
             def put(self, entity):
                 self.data.append(entity)
+            put = collection.adds('entity')(put)
+            put = collection.appender(put)
 
-            @collection.remover
-            @collection.removes(1)
             def remove(self, entity):
                 self.data.remove(entity)
+            remove = collection.removes(1)(remove)
+            remove = collection.remover(remove)
 
-            @collection.adds(1)
             def push(self, *args):
                 self.data.append(args[0])
+            push = collection.adds(1)(push)
 
-            @collection.removes('entity')
             def yank(self, entity, arg):
                 self.data.remove(entity)
+            yank = collection.removes('entity')(yank)
 
-            @collection.replaces(2)
             def replace(self, arg, entity, **kw):
                 self.data.insert(0, entity)
                 return self.data.pop()
+            replace = collection.replaces(2)(replace)
 
-            @collection.removes_return()
             def pop(self, key):
                 return self.data.pop()
+            pop = collection.removes_return()(pop)
 
-            @collection.iterator
             def __iter__(self):
                 return iter(self.data)
+            __iter__ = collection.iterator(__iter__)
 
         class Foo(object):
             pass
         class Bar(object):
             pass
         class AppenderDict(dict):
-            @collection.appender
             def set(self, item):
                 self[id(item)] = item
-            @collection.remover
+            set = collection.appender(set)
             def remove(self, item):
                 if id(item) in self:
                     del self[id(item)]
+            remove = collection.remover(remove)
 
         mapper(Foo, sometable, properties={
             'bars':relation(Bar, collection_class=AppenderDict)
         class MyCollection(object):
             def __init__(self):
                 self.data = []
-            @collection.appender
             def append(self, value):
                 self.data.append(value)
-            @collection.remover
+            append = collection.appender(append)
             def remove(self, value):
                 self.data.remove(value)
-            @collection.iterator
+            remove = collection.remover(remove)
             def __iter__(self):
                 return iter(self.data)
+            __iter__ = collection.iterator(__iter__)
 
         mapper(Parent, sometable, properties={
             'children':relation(Child, collection_class=MyCollection)

File test/orm/dynamic.py

         sess.rollback()
         self.assertEquals(u1.addresses.all(), [Address(email_address='lala@hoho.com')])
 
-    @testing.fails_on('maxdb')
     def test_delete_nocascade(self):
         mapper(User, users, properties={
             'addresses':dynamic_loader(mapper(Address, addresses), backref='user')
         sess.close()
 
         assert testing.db.scalar(addresses.count(addresses.c.user_id != None)) ==0
+    test_delete_nocascade = testing.fails_on('maxdb')(test_delete_nocascade)
 
-    @testing.fails_on('maxdb')
     def test_delete_cascade(self):
         mapper(User, users, properties={
             'addresses':dynamic_loader(mapper(Address, addresses), backref='user', cascade="all, delete-orphan")
         sess.close()
 
         assert testing.db.scalar(addresses.count()) ==0
+    test_delete_cascade = testing.fails_on('maxdb')(test_delete_cascade)
 
-    @testing.fails_on('maxdb')
     def test_remove_orphans(self):
         mapper(User, users, properties={
             'addresses':dynamic_loader(mapper(Address, addresses), cascade="all, delete-orphan", backref='user')
 
         sess.delete(u)
         sess.close()
+    test_remove_orphans = testing.fails_on('maxdb')(test_remove_orphans)
 
 
 def create_backref_test(autoflush, saveuser):

File test/orm/eager_relations.py

         assert 'orders' not in noeagers[0].__dict__
         assert 'addresses' not in noeagers[0].__dict__
 
-    @testing.fails_on('maxdb')
     def test_limit(self):
         """test limit operations combined with lazy-load relationships."""
 
             print fixtures.user_all_result[1:3]
             print l
             assert fixtures.user_all_result[1:3] == l
+    test_limit = testing.fails_on('maxdb')(test_limit)
 
     def test_distinct(self):
         # this is an involved 3x union of the users table to get a lot of rows.
             assert fixtures.user_address_result == l
         self.assert_sql_count(testing.db, go, 1)
 
-    @testing.fails_on('maxdb')
     def test_limit_2(self):
         mapper(Keyword, keywords)
         mapper(Item, items, properties = dict(
             order_by(Item.id).limit(2).all()
 
         assert fixtures.item_keyword_result[1:3] == l
+    test_limit_2 = testing.fails_on('maxdb')(test_limit_2)
 
-    @testing.fails_on('maxdb')
     def test_limit_3(self):
         """test that the ORDER BY is propigated from the inner select to the outer select, when using the
         'wrapped' select statement resulting from the combination of eager loading and limit/offset clauses."""
                 addresses=[Address(id=1)]
             )
         ] == l.all()
+    test_limit_3 = testing.fails_on('maxdb')(test_limit_3)
 
     def test_limit_4(self):
         # tests the LIMIT/OFFSET aliasing on a mapper against a select.   original issue from ticket #904
             assert [User(id=7, address=Address(id=1))] == l
         self.assert_sql_count(testing.db, go, 1)
 
-    @testing.fails_on('maxdb')
     def test_many_to_one(self):
         mapper(Address, addresses, properties = dict(
             user = relation(mapper(User, users), lazy=False)
             u1 = sess.query(User).get(7)
             assert a.user is u1
         self.assert_sql_count(testing.db, go, 1)
+    test_many_to_one = testing.fails_on('maxdb')(test_many_to_one)
 
 
     def test_one_and_many(self):
             Column('parent_id', Integer, ForeignKey('nodes.id')),
             Column('data', String(30)))
 
-    @testing.fails_on('maxdb')
     def test_basic(self):
         class Node(Base):
             def append(self, node):
                 Node(data='n13')
             ]) == d
         self.assert_sql_count(testing.db, go, 1)
+    test_basic = testing.fails_on('maxdb')(test_basic)
 
 
     def test_lazy_fallback_doesnt_affect_eager(self):
                 ),
             ])
 
-    @testing.fails_on('maxdb')
     def test_no_depth(self):
         class Node(Base):
             def append(self, node):
                 Node(data='n13')
             ]) == d
         self.assert_sql_count(testing.db, go, 3)
+    test_no_depth = testing.fails_on('maxdb')(test_no_depth)
 
 class SelfReferentialM2MEagerTest(ORMTest):
     def define_tables(self, metadata):
         
         """
         class User(Base):
-            @property
             def prop_score(self):
                 return sum([tag.prop_score for tag in self.tags])
+            prop_score = property(prop_score)
 
         class Tag(Base):
-            @property
             def prop_score(self):
                 return self.score1 * self.score2
+            prop_score = property(prop_score)
         
         for labeled, labelname in [(True, 'score'), (True, None), (False, None)]:
             clear_mappers()

File test/orm/entity.py

     """tests mappers that are constructed based on "entity names", which allows the same class
     to have multiple primary mappers """
 
-    @testing.uses_deprecated('SessionContext')
     def setUpAll(self):
         global user1, user2, address1, address2, metadata, ctx
         metadata = MetaData(testing.db)
             Column('email', String(100), nullable=False)
             )
         metadata.create_all()
+    setUpAll = testing.uses_deprecated('SessionContext')(setUpAll)
     def tearDownAll(self):
         metadata.drop_all()
     def tearDown(self):
         for t in metadata.table_iterator(reverse=True):
             t.delete().execute()
 
-    @testing.uses_deprecated('SessionContextExt')
     def testbasic(self):
         """tests a pair of one-to-many mapper structures, establishing that both
         parent and child objects honor the "entity_name" attribute attached to the object
         u1 = ctx.current.query(User, entity_name='user1').first()
         ctx.current.refresh(u1)
         ctx.current.expire(u1)
+    testbasic = testing.uses_deprecated('SessionContextExt')(testbasic)
 
 
     def testcascade(self):

File test/orm/expire.py

         s.expire(u)
         assert len(u.addresses) == 3
 
-    @testing.fails_on('maxdb')
     def test_refresh2(self):
         """test a hang condition that was occuring on expire/refresh"""
 
         assert u.name == 'Justin'
 
         s.refresh(u)
+    test_refresh2 = testing.fails_on('maxdb')(test_refresh2)
 
 if __name__ == '__main__':
     testenv.main()

File test/orm/generative.py

         assert res.order_by([Foo.c.bar])[0].bar == 5
         assert res.order_by([desc(Foo.c.bar)])[0].bar == 95
 
-    @testing.unsupported('mssql')
-    @testing.fails_on('maxdb')
     def test_slice(self):
         sess = create_session(bind=testing.db)
         query = sess.query(Foo)
         assert list(query[10:40:3]) == orig[10:40:3]
         assert list(query[-5:]) == orig[-5:]
         assert query[10:20][5] == orig[10:20][5]
+    test_slice = testing.fails_on('maxdb')(test_slice)
+    test_slice = testing.unsupported('mssql')(test_slice)
 
-    @testing.uses_deprecated('Call to deprecated function apply_max')
     def test_aggregate(self):
         sess = create_session(bind=testing.db)
         query = sess.query(Foo)
         assert query.filter(foo.c.bar<30).max(foo.c.bar) == 29
         assert query.filter(foo.c.bar<30).apply_max(foo.c.bar).first() == 29
         assert query.filter(foo.c.bar<30).apply_max(foo.c.bar).one() == 29
+    test_aggregate = testing.uses_deprecated('Call to deprecated function apply_max')(test_aggregate)
 
     def test_aggregate_1(self):
         if (testing.against('mysql') and
         query = create_session(bind=testing.db).query(Foo)
         assert query.filter(foo.c.bar<30).sum(foo.c.bar) == 435
 
-    @testing.fails_on('firebird', 'mssql')
     def test_aggregate_2(self):
         query = create_session(bind=testing.db).query(Foo)
         avg = query.filter(foo.c.bar < 30).avg(foo.c.bar)
         assert round(avg, 1) == 14.5
+    test_aggregate_2 = testing.fails_on('firebird', 'mssql')(test_aggregate_2)
 
-    @testing.fails_on('firebird', 'mssql')
-    @testing.uses_deprecated('Call to deprecated function apply_avg')
     def test_aggregate_3(self):
         query = create_session(bind=testing.db).query(Foo)
 
 
         avg_o = query.filter(foo.c.bar<30).apply_avg(foo.c.bar).one()
         assert round(avg_o, 1) == 14.5
+    test_aggregate_3 = testing.uses_deprecated('Call to deprecated function apply_avg')(test_aggregate_3)
+    test_aggregate_3 = testing.fails_on('firebird', 'mssql')(test_aggregate_3)
 
     def test_filter(self):
         query = create_session(bind=testing.db).query(Foo)

File test/orm/inheritance/basic.py

                         Column('foo_id', Integer, ForeignKey('foo.id'))
         )
 
-    @testing.fails_on('maxdb')
     def testbasic(self):
         class Foo(object): pass
         class Bar(Foo): pass
         q = sess.query(Bar)
         self.assert_(len(q.first().lazy) == 1)
         self.assert_(len(q.first().eager) == 1)
+    testbasic = testing.fails_on('maxdb')(testbasic)
 
 
 class FlushTest(ORMTest):
             Column('parent', Integer, ForeignKey('base.id'))
             )
 
-    @engines.close_open_connections
     def test_save_update(self):
         class Base(fixtures.Base):
             pass
         assert s2.subdata == 'sess1 subdata'
         s2.subdata = 'sess2 subdata'
         sess2.flush()
+    test_save_update = engines.close_open_connections(test_save_update)
 
     def test_delete(self):
         class Base(fixtures.Base):

File test/orm/inheritance/manytomany.py

         found = repr(l[0]) + repr(sorted([repr(o) for o in l[0].foos]))
         self.assertEqual(found, compare)
 
-    @testing.fails_on('maxdb')
     def testadvanced(self):
         class Foo(object):
             def __init__(self, data=None):
         x = sess.query(Blub).filter_by(id=blubid).one()
         print x
         self.assert_(repr(x) == compare)
+    testadvanced = testing.fails_on('maxdb')(testadvanced)
 
 
 if __name__ == "__main__":

File test/orm/inheritance/poly_linked_list.py

         table1_mapper.compile()
         assert table1_mapper.primary_key == [table1.c.id], table1_mapper.primary_key
 
-    @testing.fails_on('maxdb')
     def testone(self):
         self.do_testlist([Table1, Table2, Table1, Table2])
+    testone = testing.fails_on('maxdb')(testone)
 
-    @testing.fails_on('maxdb')
     def testtwo(self):
         self.do_testlist([Table3])
+    testtwo = testing.fails_on('maxdb')(testtwo)
 
-    @testing.fails_on('maxdb')
     def testthree(self):
         self.do_testlist([Table2, Table1, Table1B, Table3, Table3, Table1B, Table1B, Table2, Table1])
+    testthree = testing.fails_on('maxdb')(testthree)
 
-    @testing.fails_on('maxdb')
     def testfour(self):
         self.do_testlist([
                 Table2('t2', [Data('data1'), Data('data2')]),
                 Table3('t3', [Data('data3')]),
                 Table1B('t1b', [Data('data4'), Data('data5')])
                 ])
+    testfour = testing.fails_on('maxdb')(testfour)
 
     def do_testlist(self, classes):
         sess = create_session( )

File test/orm/lazy_relations.py

         q = sess.query(User)
         assert [User(id=7, addresses=[Address(id=1, email_address='jack@bean.com')])] == q.filter(users.c.id == 7).all()
 
-    @testing.uses_deprecated('SessionContext')
     def test_bindstosession(self):
         """test that lazy loaders use the mapper's contextual session if the parent instance
         is not in a session, and that an error is raised if no contextual session"""
             assert False
         except exceptions.InvalidRequestError, err:
             assert "not bound to a Session, and no contextual session" in str(err)
+    test_bindstosession = testing.uses_deprecated('SessionContext')(test_bindstosession)
 
     def test_orderby(self):
         mapper(User, users, properties = {

File test/orm/mapper.py

         assert len(list(sess)) == 0
         self.assertRaises(TypeError, Foo, 'one')
 
-    @testing.uses_deprecated('SessionContext', 'SessionContextExt')
     def test_constructorexceptions(self):
         """test that exceptions raised in the mapped class are not masked by sa decorations"""
         ex = AssertionError('oops')
             assert False
         except TypeError:
             assert True
+    test_constructorexceptions = testing.uses_deprecated('SessionContext', 'SessionContextExt')(test_constructorexceptions)
 
     def test_props(self):
         m = mapper(User, users, properties = {
         assert_props(Hoho, ['id', 'name', 'type'])
         assert_props(Lala, ['p_employee_number', 'p_id', 'p_name', 'p_type'])
 
-    @testing.uses_deprecated('//select_by', '//join_via', '//list')
     def test_recursive_select_by_deprecated(self):
         """test that no endless loop occurs when traversing for select_by"""
         m = mapper(User, users, properties={
         })
         q = create_session().query(m)
         q.select_by(email_address='foo')
+    test_recursive_select_by_deprecated = testing.uses_deprecated('//select_by', '//join_via', '//list')(test_recursive_select_by_deprecated)
 
     def test_mappingtojoin(self):
         """test mapping to a join"""
 
         self.assert_result(l, User, user_result[0])
 
-    @testing.uses_deprecated('//select')
     def test_customjoin_deprecated(self):
         """test that the from_obj parameter to query.select() can be used
         to totally replace the FROM parameters of the generated query."""
         q = create_session().query(m)
         l = q.select((orderitems.c.item_name=='item 4'), from_obj=[users.join(orders).join(orderitems)])
         self.assert_result(l, User, user_result[0])
+    test_customjoin_deprecated = testing.uses_deprecated('//select')(test_customjoin_deprecated)
 
     def test_orderby(self):
         """test ordering at the mapper and query level"""
         #l = create_session().query(User).select(order_by=None)
 
 
-    @testing.unsupported('firebird')
     def test_function(self):
         """Test mapping to a SELECT statement that has functions in it."""
 
             print "User", u.user_id, u.user_name, u.concat, u.count
         assert l[0].concat == l[0].user_id * 2 == 14
         assert l[1].concat == l[1].user_id * 2 == 16
+    test_function = testing.unsupported('firebird')(test_function)
 
-    @testing.unsupported('firebird')
     def test_count(self):
         """test the count function on Query.
 
         q = create_session().query(User)
         self.assert_(q.count()==3)
         self.assert_(q.count(users.c.user_id.in_([8,9]))==2)
+    test_count = testing.unsupported('firebird')(test_count)
 
-    @testing.unsupported('firebird')
-    @testing.uses_deprecated('//count_by', '//join_by', '//join_via')
     def test_count_by_deprecated(self):
         mapper(User, users)
         q = create_session().query(User)
         self.assert_(q.count_by(user_name='fred')==1)
+    test_count_by_deprecated = testing.uses_deprecated('//count_by', '//join_by', '//join_via')(test_count_by_deprecated)
+    test_count_by_deprecated = testing.unsupported('firebird')(test_count_by_deprecated)
 
     def test_manytomany_count(self):
         mapper(Item, orderitems, properties = dict(
 
         def map_(with_explicit_property):
             class User(object):
-                @extendedproperty
                 def uc_user_name(self):
                     if self.user_name is None:
                         return None
                     return self.user_name.upper()
+                uc_user_name = extendedproperty(uc_user_name)
             if with_explicit_property:
                 args = (UCComparator, User.uc_user_name)
             else:
             sess.rollback()
 
 class OptionsTest(MapperSuperTest):
-    @testing.fails_on('maxdb')
     def test_synonymoptions(self):
         sess = create_session()
         mapper(User, users, properties = dict(
             u = sess.query(User).options(eagerload('adlist')).filter_by(user_name='jack').one()
             self.assert_result(u.adlist, Address, *(user_address_result[0]['addresses'][1]))
         self.assert_sql_count(testing.db, go, 1)
+    test_synonymoptions = testing.fails_on('maxdb')(test_synonymoptions)
 
-    @testing.uses_deprecated('//select_by')
     def test_extension_options(self):
         sess  = create_session()
         class ext1(MapperExtension):
         assert l.TEST_2 == "also hello world"
         assert not hasattr(l.addresses[0], 'TEST')
         assert not hasattr(l.addresses[0], 'TEST2')
+    test_extension_options = testing.uses_deprecated('//select_by')(test_extension_options)
 
     def test_eageroptions(self):
         """tests that a lazy relation can be upgraded to an eager relation via the options method"""
             self.assert_result(l, User, *user_address_result)
         self.assert_sql_count(testing.db, go, 0)
 
-    @testing.fails_on('maxdb')
     def test_eageroptionswithlimit(self):
         sess = create_session()
         mapper(User, users, properties = dict(
             assert u.user_id == 8
             assert len(u.addresses) == 3
         assert "tbl_row_count" not in self.capture_sql(testing.db, go)
+    test_eageroptionswithlimit = testing.fails_on('maxdb')(test_eageroptionswithlimit)
 
-    @testing.fails_on('maxdb')
     def test_lazyoptionswithlimit(self):
         sess = create_session()
         mapper(User, users, properties = dict(
             assert u.user_id == 8
             assert len(u.addresses) == 3
         self.assert_sql_count(testing.db, go, 1)
+    test_lazyoptionswithlimit = testing.fails_on('maxdb')(test_lazyoptionswithlimit)
 
     def test_eagerdegrade(self):
         """tests that an eager relation automatically degrades to a lazy relation if eager columns are not available"""

File test/orm/memusage.py

 
         m3 = mapper(A, table1, non_primary=True)
 
-        @profile_memory
         def go():
             sess = create_session()
             a1 = A(col2="a1")
             for a in alist:
                 sess.delete(a)
             sess.flush()
+        go = profile_memory(go)
         go()
 
         metadata.drop_all()
             Column('col3', Integer, ForeignKey("mytable.col1"))
             )
 
-        @profile_memory
         def go():
             m1 = mapper(A, table1, properties={
                 "bs":relation(B)
             sess.flush()
             sess.close()
             clear_mappers()
+        go = profile_memory(go)
 
         metadata.create_all()
         try:
             Column('col3', String(30)),
             )
 
-        @profile_memory
         def go():
             class A(Base):
                 pass
             # dont need to clear_mappers()
             del B
             del A
+        go = profile_memory(go)
 
         metadata.create_all()
         try:
             Column('t2', Integer, ForeignKey('mytable2.col1')),
             )
 
-        @profile_memory
         def go():
             class A(Base):
                 pass
             # dont need to clear_mappers()
             del B
             del A
+        go = profile_memory(go)
 
         metadata.create_all()
         try:

File test/orm/naturalpks.py

         assert sess.get(User, 'jack') is None
<