Re: [Zope-dev] zunit 0.2 comments

2001-05-01 Thread Lalo Martins

On Mon, Apr 30, 2001 at 09:34:53PM -0700, Simon Michael wrote:
> 
> 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.

Hmm. Rolled newspaper for them. :-)


> 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)

It's a refactoring to prepare for 0.3, where we'll have the
actual TestCase object. This object will allow you to write
tests TTW.

Yes, we know a lot of you don't want to do that. Don't worry,
ExternalTestCase will always be there ;-) But you have to
realize that there are also a lot of people who just won't
touch Python code in the filesystem whenever possible. If
you're testing a ZClass-based Product, it would be completely
cumbersome to use PyUnit.

> Also, any ideas about the following which I get when running either my
> own tests or the samples:
(...)
> AttributeError: id

Mumble mumble. Probably API incompatibility between Zope
versions? We'll look further into it.

(Recent versions are deprecating direct access to the 'id'
attribute, specially because you don't know when it's a string
and when it's a method... we should have used getId())

We now have a SourceForge project, feel free to report bugs and
browse our open tasks to see where we're going :-)

[]s,
   |alo
   +
--
   I say a prayer now our love's departed
That you'll come back to stay
  Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
 pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] zunit 0.2 comments

2001-04-30 Thread Simon Michael

Lalo Martins <[EMAIL PROTECTED]> 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

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] zunit 0.2 comments

2001-04-26 Thread Lalo Martins

On Thu, Apr 26, 2001 at 01:21:01AM -0700, Simon Michael wrote:
 > Hi Lalo,
 >
 > thanks for your work on ZUnit. I have just been playing with 0.2.

Thank you for your feedback.

 > To get it working in my zope account at Codeit, I moved Hiper from
 > Shared/ to Products/ and changed the import statements.

Why?

 > I also needed to make some changes of this kind:
 >
 >  #manage_RunTestsForm = 
Globals.HTMLFile('Products/ZUnit/dtml/TestRunner/RunTests')
 >  manage_RunTestsForm = 
Globals.HTMLFile('dtml/TestRunner/RunTests',globals())

Ooops :-) this proves that Pair Programming doesn't catch them *all*.

 > I'm having trouble figuring out the syntax of the "test_ids"
 > property. Can you help ?

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

[]s,
|alo
+
--
I say a prayer now our love's departed
 That you'll come back to stay
   Bring back the perfect day

http://www.laranja.org/mailto:[EMAIL PROTECTED]
  pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)  ---   http://www.BroDar.org/


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] zunit 0.2 comments

2001-04-26 Thread Simon Michael

Hi Lalo, 

thanks for your work on ZUnit. I have just been playing with 0.2.

To get it working in my zope account at Codeit, I moved Hiper from
Shared/ to Products/ and changed the import statements. 

I also needed to make some changes of this kind:

 #manage_RunTestsForm = Globals.HTMLFile('Products/ZUnit/dtml/TestRunner/RunTests')
 manage_RunTestsForm = Globals.HTMLFile('dtml/TestRunner/RunTests',globals())

I'm having trouble figuring out the syntax of the "test_ids"
property. Can you help ?

best regards,
-Simon

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )