[Pyobjc-dev] Testsuite adventures
Brought to you by:
ronaldoussoren
From: Dinu G. <gh...@da...> - 2003-05-16 09:42:15
|
Hi, I'm investigating a little bit the shape of the testsuite and find it to be in a slightly undesirable state. I assume this is because there is no global testing module which you could easily run to execute all test modules anywhere in the source tree. So I've written one such module, allTestsTogether.py, which gives interesting results (please change the name to something like alltests.py): [localhost:~/Desktop/pyobjc] dinu% python allTestsTogether.py ..E....EEE.E..EEEEEE....EEE.E..EEEEE......................... ...............E..E..EEEEE..E................................ .2003-05-16 09:41:08.155 python[6095] *** -[NSBitmapImageRep init]: selector not recognized................EBus error It then halts instead of giving a detailed list of failures and errors. Further inspection reveils that two modules are really bad performers: Lib/objc/test/test_methods.py (28 errors, seg. fault) Lib/objc/test/test_ivar.py (bus error) This is too much for unittest to recover from... Taking them out gives you the following list of only four errors left (slightly compressed): [localhost:~/Desktop/pyobjc] dinu% python allTestsTogether.py ..2003-05-16 10:01:34.426 python[6124] *** -[NSBitmapImageRep init]: selector not recognized................E..........E................. .....................E...........E... ====================================================================== ERROR: testPythonSourcedMethods (test_methodedits.TestFromPythonClassToObjCClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_methodedits.py", line 92, in testPythonSourcedMethods TypeError: All objects in methodArray must be of type <objc.selector>. ====================================================================== ERROR: test_mixSliceNDice (test_nsarray.TestNSArrayInteraction) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_nsarray.py", line 132, in test_mixSliceNDice TypeError: must assign list (not "NSCFArray") to slice ====================================================================== ERROR: testPosing (test_posing.TestPosing) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_posing.py", line 9, in testPosing error: Class already exists in Objective-C runtime ====================================================================== ERROR: testSubclassOfSubclass (test_subclass.TestSubclassing) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_subclass.py", line 9, in testSubclassOfSubclass error: Class already exists in Objective-C runtime ---------------------------------------------------------------------- Ran 84 tests in 4.471s FAILED (errors=4) I'm attaching my umbrella test module for others to check. Just putting it in your local PyObjC root folder and executing it from anywhere on the command line should work as expected. After this investigation I'd like to know more about what the PyObjC testing policy is? Maybe a topic for some part of the documentation? Regards, Dinu |