Re: [Pyobjc-dev] Running tests in one python session
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-05-29 19:03:21
|
On Thursday, May 29, 2003, at 20:39 Europe/Amsterdam, bb...@ma... wrote: > On Thursday, May 29, 2003, at 10:49 US/Pacific, Ronald Oussoren wrote: >> - Add script to run all tests in 1 python session, this is a script by >> Dinu Gherman with minor updates by me. > > Excellent change -- much speedier, I presume. It is much speedier, and it caught more bugs than the previous script. This is probably because the bridge gets to do more work in a single session. > > Is there still an option to run the tests in different sessions? Sure, the previous script is still present. > > We had some problems early on that were only caught because the > different tests loaded things in different order or because one test > could influence another test (classAddMethods(), for example). I've updated a number of tests (test_posing and test_methodedits): They used to modify NSObject, which is not very usefull when those classes will be used later on. Both currently use another Foundation class and both should be changed to use a custom Objective-C class. BTW. test_posing should work with NSObject, but that causes a crash. I'm working on this, until that is resolved I'll keep using a class that isn't used by the other unittests. Posing also introduces another, possibly more serious, problem: If someone poses as NSObject after you import Foundation, Foundation.NSObject still references the original NSObject (which is now %NSObject). This can be fixed for 'import Foundation', but not for 'from Foundation import *'. Sadly enough the latter is how most peoply import the module. Ronald |