[Pyobjc-dev] Added simple test cases [that fail!]
Brought to you by:
ronaldoussoren
From: Bill B. <bb...@co...> - 2002-10-22 14:41:29
|
I added some simple test cases to Lib/objc/test/test_objc.py. It uses the unittest pattern from Python 2.3 (but works fine in python 2.2 -- actually, Apple doesn't ship the testing stuff with Python 2.2 and, as such, the 2.2 test pattern won't work with Apple's 2.2! A bug has been filed....). Two test cases currently fail that probably shouldn't. I haven't looked into the first, but the second is easily [but correctly?] fixed by implementing isNotEqual_ as simply (not isEqual_)? In any case, if anyone else wants to pick up the baton and start tossing test cases my way, it would be an *extremely* welcome addition!!!! Have a look at test_objc.py -- test cases are really easy to write! b.bum [bumbox:~/bbum-developer/sourceforge/pyobjc] bbum% python Lib/objc/test/test_objc.py ...EE.. ====================================================================== ERROR: testClassInvocation (__main__.Test_method_invocation) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/objc/test/test_objc.py", line 41, in testClassInvocation self.assert_( objc.runtime.NSObject.description(), "Failed to invoke the +description method." ) TypeError: Missing self argument ====================================================================== ERROR: testInstanceInvocation (__main__.Test_method_invocation) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/objc/test/test_objc.py", line 45, in testInstanceInvocation self.assertEqual( self.NSObjectInstance.self(), self.NSObjectInstance, "-self did not return same self." ) File "/BinaryCache/python/python-3.root~193/usr/lib/python2.2/unittest.py", line 285, in failUnlessEqual if first != second: File "/usr/lib/python2.2/site-packages/objc/_convenience.py", line 33, in __ne__ return self.isNotEqual_(other) != 0 AttributeError: No attribute isNotEqual_ ---------------------------------------------------------------------- Ran 7 tests in 0.022s FAILED (errors=2) |