|
Hi,
Thanks everyone for the new Pharo and all the work done. I like Spotter!
I gave Pharo 4 a try today and ran into a problem with running tests
in a TestCase (test class -> run tests). I just get the debugger
popping up with WARequestContextNotFound.
In the setUp of our test case, we call WACurrentRequestContext value,
but handle the error when we do not have a context, for example:
[ WACurrentRequestContext value. true ]
on: WARequestContextNotFound
do: [ :e | false ]
This handler: "[ :e | false ]" is never called. What influences this
is the exception handling in:
AbstractNautilusUI >> #runTestsOfClass:notifying:
Firstly, I think that it may be slighly better to call "e pass" or "e
outer" in stead of "e defaultAction", as this would give another outer
handler a chance to do something. The defaultAction is called when
there are no more outer handlers anyway.
After trying this, it did not help my cause. And I think that this is
because the WACurrentRequestContext is a Notification and not an
Error.
I then replaced Exception with Error in the handler in
AbstractNautilusUI. This seem to work. What also works is to
completely remove the exception handling in AbstractNautilusUI >>
#runTestsOfClass:notifying:
What is a bit strange is the inconsistency in this exception handling
when running a suite or an individual test. Perhaps this kind of code
could be better on the TestSuite and not in the Nautilus UI?
Can anyone please help? Should I be doing something else?
Cheers
Otto
|