summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-06-05 19:18:48 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-06-05 19:18:48 +0000
commit2c64bca2143609ca43394bfaad9e67b7cf239688 (patch)
tree85853071e1cc15af68f184c36eb55739e1260d29 /test/sql
parente1796fcdcbd510fcbb155435fc2eeb58493072ab (diff)
downloadsqlalchemy-2c64bca2143609ca43394bfaad9e67b7cf239688.tar.gz
0.2.2 prep, added "pickler" option to Pickle type
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/testtypes.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/sql/testtypes.py b/test/sql/testtypes.py
index f369bd384..2ec1fe795 100644
--- a/test/sql/testtypes.py
+++ b/test/sql/testtypes.py
@@ -6,11 +6,6 @@ import sqlalchemy.engine.url as url
import sqlalchemy.types
-# TODO: cant get cPickle to pickle the "Foo" class from this module,
-# now that its moved
-import pickle
-sqlalchemy.types.pickle = pickle
-
db = testbase.db
@@ -177,6 +172,8 @@ class Foo(object):
def __eq__(self, other):
return other.data == self.data and other.stuff == self.stuff and other.moredata==self.moredata
+import pickle
+
class BinaryTest(AssertMixin):
def setUpAll(self):
global binary_table
@@ -185,7 +182,10 @@ class BinaryTest(AssertMixin):
Column('data', Binary),
Column('data_slice', Binary(100)),
Column('misc', String(30)),
- Column('pickled', PickleType)
+ # construct PickleType with non-native pickle module, since cPickle uses relative module
+ # loading and confuses this test's parent package 'sql' with the 'sqlalchemy.sql' package relative
+ # to the 'types' module
+ Column('pickled', PickleType(pickler=pickle))
)
binary_table.create()
def tearDownAll(self):