From 752750ea7e4cd026655f0dea19998821a08ac35a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 25 Aug 2012 13:30:58 -0400 Subject: [PATCH] - fix for pypy - more oracle fixes --- test/lib/requires.py | 16 +++++----------- test/orm/inheritance/test_basic.py | 12 ++++++++---- test/sql/test_query.py | 2 ++ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/lib/requires.py b/test/lib/requires.py index f58367af47..3fb5e7e14b 100644 --- a/test/lib/requires.py +++ b/test/lib/requires.py @@ -318,17 +318,11 @@ def cextensions(fn): def dbapi_lastrowid(fn): - if util.pypy: - return _chain_decorators_on( - fn, - fails_if(lambda:True) - ) - else: - return _chain_decorators_on( - fn, - fails_on_everything_except('mysql+mysqldb', 'mysql+oursql', - 'sqlite+pysqlite', 'mysql+pymysql'), - ) + return _chain_decorators_on( + fn, + fails_on_everything_except('mysql+mysqldb', 'mysql+oursql', + 'sqlite+pysqlite', 'mysql+pymysql'), + ) def sane_multi_rowcount(fn): return _chain_decorators_on( diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index 558ce9bffe..ad30ab44de 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -444,7 +444,8 @@ class SortOnlyOnImportantFKsTest(fixtures.MappedTest): class A(Base): __tablename__ = "a" - id = Column(Integer, primary_key=True) + id = Column(Integer, primary_key=True, + test_needs_autoincrement=True) b_id = Column(Integer, ForeignKey('b.id')) class B(A): @@ -471,8 +472,10 @@ class FalseDiscriminatorTest(fixtures.MappedTest): Column('type', Boolean, nullable=False)) def test_false_on_sub(self): - class Foo(object):pass - class Bar(Foo):pass + class Foo(object): + pass + class Bar(Foo): + pass mapper(Foo, t1, polymorphic_on=t1.c.type, polymorphic_identity=True) mapper(Bar, inherits=Foo, polymorphic_identity=False) sess = create_session() @@ -1804,7 +1807,8 @@ class TransientInheritingGCTest(fixtures.TestBase): class A(Base): __tablename__ = 'a' - id = Column(Integer, primary_key=True, test_needs_pk=True) + id = Column(Integer, primary_key=True, + test_needs_autoincrement=True) data = Column(String(10)) self.A = A return Base diff --git a/test/sql/test_query.py b/test/sql/test_query.py index 06854c4fca..e79bf32e3f 100644 --- a/test/sql/test_query.py +++ b/test/sql/test_query.py @@ -815,6 +815,8 @@ class QueryTest(fixtures.TestBase): lambda: r['foo'] ) + @testing.fails_if(lambda: util.pypy, "lastrowid not maintained after " + "connection close") @testing.requires.dbapi_lastrowid def test_native_lastrowid(self): r = testing.db.execute( -- 2.47.3