[PyObjC-svn] r2050 - in trunk/pyobjc/pyobjc-framework-ExceptionHandling: Lib Lib/ExceptionHandling PyObjCTest

[email protected]
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Tue Jan 27 12:20:57 2009
New Revision: 2050

Log:
Full API test coverage on Leopard

Added:
   trunk/pyobjc/pyobjc-framework-ExceptionHandling/Lib/ExceptionHandling/PyObjC.bridgesupport
   trunk/pyobjc/pyobjc-framework-ExceptionHandling/PyObjCTest/test_nsexceptionhandler.py   (contents, props changed)
Removed:
   trunk/pyobjc/pyobjc-framework-ExceptionHandling/Lib/ExceptionHandling/PyObjCOverrides.bridgesupport
Modified:
   trunk/pyobjc/pyobjc-framework-ExceptionHandling/Lib/   (props changed)
   trunk/pyobjc/pyobjc-framework-ExceptionHandling/PyObjCTest/test_exceptionhandling.py

Modified: trunk/pyobjc/pyobjc-framework-ExceptionHandling/PyObjCTest/test_exceptionhandling.py
==============================================================================
--- trunk/pyobjc/pyobjc-framework-ExceptionHandling/PyObjCTest/test_exceptionhandling.py	(original)
+++ trunk/pyobjc/pyobjc-framework-ExceptionHandling/PyObjCTest/test_exceptionhandling.py	Tue Jan 27 12:20:57 2009
@@ -2,41 +2,13 @@
 Some simple tests to check that the framework is properly wrapped.
 '''
 import objc
-import unittest
+from PyObjCTools.TestSupport import *
 import ExceptionHandling
 
-class TestExceptionHandling (unittest.TestCase):
+class TestExceptionHandling (TestCase):
     def testClasses(self):
         self.assert_(hasattr(ExceptionHandling, 'NSExceptionHandler'))
         self.assert_(isinstance(ExceptionHandling.NSExceptionHandler, objc.objc_class))
 
-    def testValues(self):
-        self.assert_( hasattr(ExceptionHandling, 'NSLogUncaughtExceptionMask') )
-        self.assert_( isinstance(ExceptionHandling.NSLogUncaughtExceptionMask, (int, long)) )
-        self.assertEquals(ExceptionHandling.NSLogUncaughtExceptionMask, 1)
-
-        self.assert_( hasattr(ExceptionHandling, 'NSLogOtherExceptionMask') )
-        self.assert_( isinstance(ExceptionHandling.NSLogOtherExceptionMask, (int, long)) )
-
-        self.assertEquals(ExceptionHandling.NSLogOtherExceptionMask, 1 << 8)
-
-        self.assert_( hasattr(ExceptionHandling, 'NSLogAndHandleEveryExceptionMask') )
-        self.assert_( isinstance(ExceptionHandling.NSLogAndHandleEveryExceptionMask, (int, long)) )
-
-        self.assert_( hasattr(ExceptionHandling, 'NSHangOnEveryExceptionMask') )
-        self.assert_( isinstance(ExceptionHandling.NSHangOnEveryExceptionMask, (int, long)) )
-
-
-    def testVariables(self):
-        self.assert_( hasattr(ExceptionHandling, 'NSUncaughtSystemExceptionException') )
-        self.assert_( isinstance(ExceptionHandling.NSUncaughtSystemExceptionException, unicode) )
-
-    def testProtocols(self):
-        self.assert_( hasattr(ExceptionHandling, 'protocols') )
-
-        self.assert_( hasattr(ExceptionHandling.protocols, 'NSExceptionHandlerDelegate') )
-        self.assert_( isinstance(ExceptionHandling.protocols.NSExceptionHandlerDelegate, objc.informal_protocol) )
-
 if __name__ == "__main__":
-    unittest.main()
-
+    main()

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.