From 75c6d5a26b0f2f1af133b598a28665323df392da Mon Sep 17 00:00:00 2001 From: Michael Trier Date: Fri, 30 Jan 2009 04:54:19 +0000 Subject: [PATCH] Callable must be defined before path magic occurs. --- test/testlib/compat.py | 5 ++++- test/testlib/testing.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/testlib/compat.py b/test/testlib/compat.py index 3fb1131af9..ae27e6c355 100644 --- a/test/testlib/compat.py +++ b/test/testlib/compat.py @@ -12,5 +12,8 @@ def _function_named(fn, newname): fn.func_defaults, fn.func_closure) return fn -from sqlalchemy.util import callable +try: + import callable +except ImportError: + callable = lambda x: hasattr(x, '__call__') diff --git a/test/testlib/testing.py b/test/testlib/testing.py index d9df784524..5e28dfb576 100644 --- a/test/testlib/testing.py +++ b/test/testlib/testing.py @@ -12,7 +12,7 @@ import warnings from cStringIO import StringIO import testlib.config as config -from testlib.compat import _function_named, callable +from testlib.compat import _function_named # Delayed imports MetaData = None -- 2.47.3