From: Mike Bayer Date: Mon, 17 Jun 2013 03:09:31 +0000 (-0400) Subject: - clean up this test (really we don't even need this, it's not testing much) X-Git-Tag: rel_0_9_0b1~258 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07e6161c6ba85559472e1ab9dab5955752bf9c09;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - clean up this test (really we don't even need this, it's not testing much) - for the moment, put a catch in it to see if we can trap that issue on jenkins --- diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py index 9a243f0f26..73655bb1ef 100644 --- a/test/dialect/test_oracle.py +++ b/test/dialect/test_oracle.py @@ -801,27 +801,34 @@ drop synonym test_schema.ptable; select([parent, child]).select_from(parent.join(child)).execute().fetchall() -class ConstraintTest(fixtures.TestBase): +class ConstraintTest(fixtures.TablesTest): __only_on__ = 'oracle' + run_deletes = None - def setup(self): - global metadata - metadata = MetaData(testing.db) - foo = Table('foo', metadata, Column('id', Integer, - primary_key=True)) - foo.create(checkfirst=True) + @classmethod + def define_tables(cls, metadata): + foo = Table('foo', metadata, Column('id', Integer, primary_key=True)) - def teardown(self): - metadata.drop_all() + # temporary, trying to debug an issue on jenkins + try: + foo.create(checkfirst=True) + except: + obj = [dict(r) for r in testing.db.execute( + "select * from all_objects " + "where object_name='FOO'")] + raise Exception("objects: %r" % obj) def test_oracle_has_no_on_update_cascade(self): - bar = Table('bar', metadata, Column('id', Integer, - primary_key=True), Column('foo_id', Integer, + bar = Table('bar', self.metadata, + Column('id', Integer, primary_key=True), + Column('foo_id', Integer, ForeignKey('foo.id', onupdate='CASCADE'))) assert_raises(exc.SAWarning, bar.create) - bat = Table('bat', metadata, Column('id', Integer, - primary_key=True), Column('foo_id', Integer), + + bat = Table('bat', self.metadata, + Column('id', Integer, primary_key=True), + Column('foo_id', Integer), ForeignKeyConstraint(['foo_id'], ['foo.id'], onupdate='CASCADE')) assert_raises(exc.SAWarning, bat.create)