[Zope-dev] zunit 0.2 comments

Simon Michael simon@joyful.com
30 Apr 2001 21:34:53 -0700


Lalo Martins <lalo@laranja.org> writes:
>  > To get it working in my zope account at Codeit, I moved Hiper
>  > from Shared/ to Products/ and changed the import statements.
> 
> Why?

Zope or the codeit setup didn't seem to see things in
INSTANCE_HOME/Shared and I don't have access to SOFTWARE_HOME/Shared.

> Each line is the Id of an ExternalTestCase object. You can use
> RestrictedTraversal, as in MyFolder/tests/MyTestCase.

Ok - only after importing ZUnit-samples.zexp could I get a clue about
how to make this work. I suppose I could have tried that sooner.

What's the reason for this new level of indirection, the
ExternalTestCase object ? And do you think this name is appropriate ?
(I am confused about tests vs test cases vs test suites)

Also, any ideas about the following which I get when running either my
own tests or the samples:

Traceback (innermost last):
  File "/home/simon/Products/ZUnit/TestRunner.py", line 83, in running
    test.run(tm)
  File "/home/simon/Products/ZUnit/ExternalTestCase.py", line 83, in run
    self._testInstance().run(tr)
  File "/home/simon/Products/ZUnit/unittest.py", line 239, in run
    return self(result)
  File "/home/simon/Products/ZUnit/unittest.py", line 245, in __call__
    test(result)
  File "/home/simon/Products/ZUnit/unittest.py", line 141, in __call__
    result.startTest(self)
  File "/home/simon/Products/ZUnit/ExternalTestCase.py", line 44, in startTest
    context = self.monitor.startTestWithContext(test)
  File "/home/simon/Products/ZUnit/TestMonitor.py", line 93, in startTestWithContext
    return self.testReport.newContext(test.id())
AttributeError: id

Best regards,
-Simon