Commits

Mike Bayer committed 7f624de

- fix for pypy
- more oracle fixes

Comments (0)

Files changed (3)

test/lib/requires.py

 
 
 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(

test/orm/inheritance/test_basic.py

         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):
             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()
 
         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

test/sql/test_query.py

             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(