1. Ronald Oussoren
  2. pyobjc

Commits

Bob Ippolito  committed 096796c

fix stupid test

  • Participants
  • Parent commits bd464bb
  • Branches pyobjc-ancient

Comments (0)

Files changed (1)

File Lib/Foundation/test/test_nsnumber.py

View file
  • Ignore whitespace
 
             self.assertEquals(stripDocType(data), stripDocType(PLIST))
 
-class TestDecimalNumber (unittest.TestCase):
-    # NSDecimalNumber is treated specially
+if isinstance(NSDecimalNumber.decimalNumberWithString_(u'1.00'), NSDecimalNumber):
+    class TestDecimalNumber (unittest.TestCase):
+        # NSDecimalNumber is treated specially
 
-    # TODO: Add tests for using decimal numbers (addition, multiplication, ...)
+        # TODO: Add tests for using decimal numbers (addition, multiplication, ...)
 
-    def testProxy (self):
-        o = NSDecimalNumber.decimalNumberWithString_(u"1.00")
+        def testProxy (self):
+            o = NSDecimalNumber.decimalNumberWithString_(u"1.00")
+            self.assert_(isinstance(o, NSDecimalNumber))
 
-        self.assert_(isinstance(o, NSDecimalNumber))
+else:
+    class TestDecimalNumber (unittest.TestCase):
+        # NSDecimalNumber is treated specially
+
+        # TODO: Add tests for using decimal numbers (addition, multiplication, ...)
+
+        def testProxy (self):
+            o = NSDecimalNumber.decimalNumberWithString_(u"1.00")
+            self.assert_(isinstance(o, NSDecimal))
 
 if __name__ == '__main__':
     unittest.main( )