be used. This will impact decimal accuracy and some
unicode handling issues. [ticket:1775]
+ - Fixed use_ansi=False mode, which was producing broken
+ WHERE clauses in pretty much all cases. [ticket:1790]
+
+ - oracle_xe 5 doesn't accept a Python unicode object in
+ its connect string in normal Python 2.x mode - so we coerce
+ to str() directly. non-ascii characters aren't supported
+ in connect strings here since we don't know what encoding
+ we could use. [ticket:1670]
+
- firebird
- Added a label to the query used within has_table() and
has_sequence() to work with older versions of Firebird
global db, dbapi
dbapi = MockDBAPI()
-- # create engine using our current dburi
-- db = tsa.create_engine('postgresql://foo:bar@localhost/test', module=dbapi, _initialize=False)
++ db = tsa.create_engine(
++ 'postgresql://foo:bar@localhost/test',
++ module=dbapi, _initialize=False)
# monkeypatch disconnect checker
db.dialect.is_disconnect = lambda e: isinstance(e, MockDisconnect)
assert not conn.invalidated
assert len(dbapi.connections) == 1
- # create engine using our current dburi
- db = tsa.create_engine('postgresql://foo:bar@localhost/test', module=dbapi, _initialize=False)
+ class CursorErrTest(TestBase):
+
+ def setup(self):
+ global db, dbapi
+
+ class MDBAPI(MockDBAPI):
+ def connect(self, *args, **kwargs):
+ return MConn(self)
+
+ class MConn(MockConnection):
+ def cursor(self):
+ return MCursor(self)
+
+ class MCursor(MockCursor):
+ def close(self):
+ raise Exception("explode")
+
+ dbapi = MDBAPI()
+
++ db = tsa.create_engine(
++ 'postgresql://foo:bar@localhost/test',
++ module=dbapi, _initialize=False)
+
+ def test_cursor_explode(self):
+ conn = db.connect()
+ result = conn.execute("select foo")
+ result.close()
+ conn.close()
++
++ def teardown(self):
++ db.dispose()
+
engine = None
class RealReconnectTest(TestBase):
def setup(self):