summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-05-26 17:58:07 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-05-26 17:58:07 -0400
commit38f65baf1895a679aacf9981d60af6cd7782df82 (patch)
tree406579b37e38442353b108662ccc6443d57ce13d
parentabc43312938434ca42b83f79ddb9b16a4f67bffa (diff)
downloadsqlalchemy-38f65baf1895a679aacf9981d60af6cd7782df82.tar.gz
- oracle tests passing in py3k!!
-rw-r--r--.gitignore1
-rw-r--r--test/dialect/test_oracle.py13
2 files changed, 8 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index e04e53b46..d85b893ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ tox.ini
.coverage
.*,cover
*.so
+sqlnet.log
diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py
index 7c17459d6..d26ca6c03 100644
--- a/test/dialect/test_oracle.py
+++ b/test/dialect/test_oracle.py
@@ -7,7 +7,7 @@ from sqlalchemy import types as sqltypes, exc, schema
from sqlalchemy.sql import table, column
from sqlalchemy.testing import fixtures, AssertsExecutionResults, AssertsCompiledSQL
from sqlalchemy import testing
-from sqlalchemy.util import u
+from sqlalchemy.util import u, b
from sqlalchemy import util
from sqlalchemy.testing import assert_raises, assert_raises_message
from sqlalchemy.testing.engines import testing_engine
@@ -1279,10 +1279,10 @@ class TypesTest(fixtures.TestBase):
Column('data', oracle.RAW(35))
)
metadata.create_all()
- testing.db.execute(raw_table.insert(), id=1, data="ABCDEF")
+ testing.db.execute(raw_table.insert(), id=1, data=b("ABCDEF"))
eq_(
testing.db.execute(raw_table.select()).first(),
- (1, "ABCDEF")
+ (1, b("ABCDEF"))
)
@testing.provide_metadata
@@ -1369,10 +1369,10 @@ class TypesTest(fixtures.TestBase):
try:
engine.execute(t.insert(), id=1,
data='this is text',
- bindata='this is binary')
+ bindata=b('this is binary'))
row = engine.execute(t.select()).first()
eq_(row['data'].read(), 'this is text')
- eq_(row['bindata'].read(), 'this is binary')
+ eq_(row['bindata'].read(), b('this is binary'))
finally:
t.drop(engine)
@@ -1457,7 +1457,8 @@ class BufferedColumnTest(fixtures.TestBase, AssertsCompiledSQL):
stream = os.path.join(
os.path.dirname(__file__), "..",
'binary_data_one.dat')
- stream = file(stream).read(12000)
+ with open(stream, "rb") as file_:
+ stream = file_.read(12000)
for i in range(1, 11):
binary_table.insert().execute(id=i, data=stream)