diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-02 22:26:36 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-02 22:26:36 -0500 |
commit | 70b0eb468305449b92d67fd65eaa7a4892f102da (patch) | |
tree | bc3fe645c2e7ef6c123c16e9382a2a6e4663db1a | |
parent | 28dd27972be6319d9cfcfc169a6091254feb1e7b (diff) | |
download | sqlalchemy-70b0eb468305449b92d67fd65eaa7a4892f102da.tar.gz |
more test fixes, removing old deprecated tests that haven't been running...
-rw-r--r-- | test/sql/test_functions.py | 11 | ||||
-rw-r--r-- | test/sql/test_metadata.py | 12 | ||||
-rw-r--r-- | test/sql/test_types.py | 30 |
3 files changed, 1 insertions, 52 deletions
diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py index 3e47e018b..6c6d97fab 100644 --- a/test/sql/test_functions.py +++ b/test/sql/test_functions.py @@ -306,17 +306,6 @@ class ExecuteTest(fixtures.TestBase): def tearDown(self): pass - @testing.uses_deprecated - def test_standalone_execute(self): - x = testing.db.func.current_date().execute().scalar() - y = testing.db.func.current_date().select().execute().scalar() - z = testing.db.func.current_date().scalar() - assert (x == y == z) is True - - # ansi func - x = testing.db.func.current_date() - assert isinstance(x.type, Date) - assert isinstance(x.execute().scalar(), datetime.date) def test_conn_execute(self): from sqlalchemy.sql.expression import FunctionElement diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py index 5e256046d..ce95634fd 100644 --- a/test/sql/test_metadata.py +++ b/test/sql/test_metadata.py @@ -1249,16 +1249,6 @@ class UseExistingTest(fixtures.TablesTest): go ) - @testing.uses_deprecated - def test_deprecated_useexisting(self): - meta2 = self._useexisting_fixture() - users = Table('users', meta2, Column('name', Unicode), - autoload=True, useexisting=True) - assert isinstance(users.c.name.type, Unicode) - assert not users.quote - users = Table('users', meta2, quote=True, autoload=True, - useexisting=True) - assert users.quote def test_keep_plus_existing_raises(self): meta2 = self._useexisting_fixture() @@ -1268,7 +1258,7 @@ class UseExistingTest(fixtures.TablesTest): extend_existing=True ) - @testing.uses_deprecated + @testing.uses_deprecated() def test_existing_plus_useexisting_raises(self): meta2 = self._useexisting_fixture() assert_raises( diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 3950b1a6a..887e76827 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -1351,36 +1351,6 @@ class ExpressionTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiled expr = column('foo', CHAR) == "asdf" eq_(expr.right.type.__class__, CHAR) - @testing.uses_deprecated - @testing.fails_on('firebird', 'Data type unknown on the parameter') - @testing.fails_on('mssql', 'int is unsigned ? not clear') - def test_operator_adapt(self): - """test type-based overloading of operators""" - - # test string concatenation - expr = test_table.c.data + "somedata" - eq_(testing.db.execute(select([expr])).scalar(), "somedatasomedata") - - expr = test_table.c.id + 15 - eq_(testing.db.execute(select([expr])).scalar(), 16) - - # test custom operator conversion - expr = test_table.c.avalue + 40 - assert expr.type.__class__ is test_table.c.avalue.type.__class__ - - # value here is calculated as (250 - 40) / 10 = 21 - # because "40" is an integer, not an "avalue" - eq_(testing.db.execute(select([expr.label('foo')])).scalar(), 21) - - expr = test_table.c.avalue + literal(40, type_=MyCustomType) - - # + operator converted to - - # value is calculated as: (250 - (40 * 10)) / 10 == -15 - eq_(testing.db.execute(select([expr.label('foo')])).scalar(), -15) - - # this one relies upon anonymous labeling to assemble result - # processing rules on the column. - eq_(testing.db.execute(select([expr])).scalar(), -15) def test_typedec_operator_adapt(self): expr = test_table.c.bvalue + "hi" |