Commit 2e7942cf by Chris Jerdonek

Skip the test_built_in_type__integer() test when int.real isn't defined (Python 2.4 and 2.5).

parent acc31ffd
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment