summaryrefslogtreecommitdiff
path: root/tests/test_context.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_context.py')
-rw-r--r--tests/test_context.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_context.py b/tests/test_context.py
index 41b77b4..decf4fb 100644
--- a/tests/test_context.py
+++ b/tests/test_context.py
@@ -157,6 +157,17 @@ class GetValueTests(unittest.TestCase, AssertIsMixin):
item1 = MyInt(10)
item2 = 10
+ try:
+ item2.real
+ except AttributeError:
+ # Then skip this unit test. The numeric type hierarchy was
+ # added only in Python 2.6, in which case integers inherit
+ # from complex numbers the "real" attribute, etc:
+ #
+ # http://docs.python.org/library/numbers.html
+ #
+ return
+
self.assertEquals(item1.real, 10)
self.assertEquals(item2.real, 10)