Fixed some size_t related warnings.
[libfirm] / scripts / jinja2 / tests.py
index 6873b5a..d257eca 100644 (file)
@@ -5,17 +5,27 @@
 
     Jinja test functions. Used with the "is" operator.
 
-    :copyright: 2007 by Armin Ronacher.
+    :copyright: (c) 2010 by the Jinja Team.
     :license: BSD, see LICENSE for more details.
 """
 import re
 from jinja2.runtime import Undefined
 
+# nose, nothing here to test
+__test__ = False
+
 
 number_re = re.compile(r'^-?\d+(\.\d+)?$')
 regex_type = type(number_re)
 
 
+try:
+    test_callable = callable
+except NameError:
+    def test_callable(x):
+        return hasattr(x, '__call__')
+
+
 def test_odd(value):
     """Return true if the variable is odd."""
     return value % 2 == 1
@@ -130,7 +140,7 @@ TESTS = {
     'number':           test_number,
     'sequence':         test_sequence,
     'iterable':         test_iterable,
-    'callable':         callable,
+    'callable':         test_callable,
     'sameas':           test_sameas,
     'escaped':          test_escaped
 }