would close a Connection passed as a
bind argument. Regression from 0.6.
=====
- sql
+ - Fixed bug whereby metadata.reflect(bind)
+ would close a Connection passed as a
+ bind argument. Regression from 0.6.
+
- Streamlined the process by which a Select
determines what's in it's '.c' collection.
Behaves identically, except that a
for name in load:
Table(name, self, **reflect_opts)
finally:
- if conn is not None:
+ if conn is not None and \
+ conn is not bind:
conn.close()
def append_ddl_listener(self, event_name, listener):
m9.reflect()
self.assert_(not m9.tables)
+ def test_reflect_all_conn_closing(self):
+ m1 = MetaData()
+ c = testing.db.connect()
+ m1.reflect(bind=c)
+ assert not c.closed
+
+ def test_inspector_conn_closing(self):
+ m1 = MetaData()
+ c = testing.db.connect()
+ i = Inspector.from_engine(testing.db)
+ assert not c.closed
+
def test_index_reflection(self):
m1 = MetaData(testing.db)
t1 = Table('party', m1,