summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMichael Trier <mtrier@gmail.com>2008-10-04 02:57:19 +0000
committerMichael Trier <mtrier@gmail.com>2008-10-04 02:57:19 +0000
commitdc5f360cd3e94f43f90b7cee3c8b5ba3de2e26cf (patch)
treee8695db1850020c4d3dd8e07b95d873866fdbd39 /test/sql
parent56e88ed7c3b4bd6890087d6d2ced6514076d56c3 (diff)
downloadsqlalchemy-dc5f360cd3e94f43f90b7cee3c8b5ba3de2e26cf.tar.gz
Didnt think about <2.5. When will I learn.
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/testtypes.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/sql/testtypes.py b/test/sql/testtypes.py
index c8b9d7f39..a3d813d0f 100644
--- a/test/sql/testtypes.py
+++ b/test/sql/testtypes.py
@@ -797,6 +797,19 @@ class BooleanTest(TestBase, AssertsExecutionResults):
print res2
assert(res2==[(2, False)])
+try:
+ from functools import partial
+except:
+ def partial(func, *args, **keywords):
+ def newfunc(*fargs, **fkeywords):
+ newkeywords = keywords.copy()
+ newkeywords.update(fkeywords)
+ return func(*(args + fargs), **newkeywords)
+ newfunc.func = func
+ newfunc.args = args
+ newfunc.keywords = keywords
+ return newfunc
+
class CallableTest(TestBase, AssertsExecutionResults):
def setUpAll(self):
global meta
@@ -806,7 +819,6 @@ class CallableTest(TestBase, AssertsExecutionResults):
meta.drop_all()
def test_callable_as_arg(self):
- from functools import partial
ucode = partial(Unicode, assert_unicode=None)
thing_table = Table('thing', meta,
@@ -814,7 +826,6 @@ class CallableTest(TestBase, AssertsExecutionResults):
)
def test_callable_as_kwarg(self):
- from functools import partial
ucode = partial(Unicode, assert_unicode=None)
thang_table = Table('thang', meta,