[squeak-dev] [SUnit] how to: clean up *all* obsolete classes during tests?

Frank Shearar frank.shearar at gmail.com
Wed Feb 27 10:33:13 UTC 2013


On 26 February 2013 23:32, Max Leske <maxleske at gmail.com> wrote:
> I have I case where I absolutely need to get rid of all obsolete classes but #fixObsoleteReferences simply refuses to nuke all entries in the #ObsoleteSubclasses variable of Behavior. The classes and meta classes that don't go away are subclasses of ClassFactoryForTestCase and I do send it the #cleanup method.
>
> I noticed that this only is true as long as the test runner is open. Once I close the test runner, #fixObsoleteReferences succeeds. But that doesn't really help me because my test case fails *in* the test runner of course…

The TestRunner keeps a handle on the obsolete classes. I don't know
enough about SUnit to know the precise fix, but it seems like
#fixObsoleteReferences could walk - like it does for Preferences -
_something_ (TestSuites? TestCases?) and manually repair the
references?

Nicolas, thoughts? (I'm picking on you just because you touched
#fixObsoleteReferences last, and therefore know more than me :) )

frank


More information about the Squeak-dev mailing list