[Zope3-dev] RE: [Zope3-checkins] SVN: Zope3/trunk/ Bugfix:

2005-12-03 Thread Roger Ineichen
Hi Benji,
 
> Roger Ineichen wrote:
> > Log message for revision 40515:
> 
> >   See also collector issue at:
> >   http://www.zope.org/Collectors/Zope3-dev/503 
> 
> So this should be resolved, right?

I added a small fix for the 3rd party package 'jsonserver'

I guess we have to find a different concept for find a 
factory __module__ path for 3rd party packages. Right now
the implementation in getViewFactoryData doesn't fit for 
3rd party packages and will end in doctest errors.

Regards
Roger Ineichen


> -- 
> Benji York
> Senior Software Engineer
> Zope Corporation
> 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/ Bugfix:

2005-12-03 Thread Benji York

Roger Ineichen wrote:

Log message for revision 40515:



  See also collector issue at:
  http://www.zope.org/Collectors/Zope3-dev/503 


So this should be resolved, right?
--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] RE: [Zope3-checkins] SVN: Zope3/trunk/ Bugfix:

2005-12-03 Thread Roger Ineichen
Hi Benji

[...]
> Here is what I'd do:
> 
> >  they are provided in a aseparate section. To see anything 
> useful, we have to
> >  add an object to the folder first:
> >  
> > ->>> link = 
> 'http://localhost/@@+/action.html?type_name=zope.app.file.File'
> > ->>> browser.getLink(url=link).click()
> > +>>> import re
> > +>>> browser.getLink(re.compile('^File$')).click()
> >  >>> import cStringIO
> >  >>> browser.getControl('Data').value = 
> cStringIO.StringIO('content')
> >  >>> browser.getControl(name='add_input_name').value = 
> 'file.txt'
> 
> 
> I'm not really a big fan of using regular expressions in testbrowser,
> but they exist and we don't have time to implement something better
> (probably XPath) before 3.2 is released.
> -- 

That's fine for me as long we only check the 'File' as name. 
Can you commit it.

I agree on changing this part for the next release.

Regards
Roger Ineichen

Projekt01 GmbH
_
END OF MESSAGE

> Benji York
> Senior Software Engineer
> Zope Corporation
> 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] RE: [Zope3-checkins] SVN: Zope3/trunk/ Bugfix:

2005-12-03 Thread Roger Ineichen
Hi Benji

> -Original Message-
> From: Benji York [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, December 03, 2005 4:56 PM
> To: Roger Ineichen
> Cc: zope3-dev@zope.org
> Subject: Re: [Zope3-checkins] SVN: Zope3/trunk/ Bugfix:
> 
> Roger Ineichen wrote:
> > Log message for revision 40515:
> >   Bugfix:
> >   Using getLink('File') will end in a testing failure in 
> our application
> >   because we use a content type '- File' which produce a 
> link called '- File'.
> >   Use the more concrete url attribute instead of the text 
> attribute in 
> >   the getLink method will avoid this. 
> >   
> >   See also collector issue at:
> >   http://www.zope.org/Collectors/Zope3-dev/503 
> 
> > Modified: 
> Zope3/trunk/src/zope/app/apidoc/codemodule/browser/introspector.txt
> > ===
> > --- 
> Zope3/trunk/src/zope/app/apidoc/codemodule/browser/introspec
> tor.txt   2005-12-03 04:34:49 UTC (rev 40514)
> > +++ 
> Zope3/trunk/src/zope/app/apidoc/codemodule/browser/introspec
> tor.txt   2005-12-03 12:32:48 UTC (rev 40515)
> > @@ -134,7 +134,8 @@
> >  they are provided in a aseparate section. To see anything 
> useful, we have to
> >  add an object to the folder first:
> >  
> > ->>> browser.getLink('File').click()
> > +>>> link = 
> 'http://localhost/@@+/action.html?type_name=zope.app.file.File'
> > +>>> browser.getLink(url=link).click()
> >  >>> import cStringIO
> >  >>> browser.getControl('Data').value = 
> cStringIO.StringIO('content')
> >  >>> browser.getControl(name='add_input_name').value = 
> 'file.txt'
> 
> This isn't really in the "spirit" of testbrowser.  Previously 
> the test 
> would ensure that the desired link appeared on the page, was named 
> correctly (if a bit too generically), and that it went to the 
> appropriate place.  The new version just makes sure the 
> hard-coded URL 
> points to the correct page.

The previous test isn't usefull and raises errors.
It's probably usefull as a human readable documentation.

If I have a link give from a custom content type
called 'My File' and the original link isn't there
because of a missconfguration, the test whould also 
pass. Which I guess ins't the target.

I think we have to find a way where we can ensure that we 
test the correct part and only that part.

Perhaps this is only a usecase if we test generic 
registrablecomponent where will produce links.

Perhaps a method testLink('File') whould be Ok for testing.
But the combination of getLink('File').click() isn't a good idea.
Then this will end in messing up the test if I register a content
type called 'A File' where is rendered before the 'File' link in HTML.

> I prefer some variation on the previous style (with appropriate 
> correction so it isn't so brittle).  

> Comments/ideas?

Not really ;-)

Regards
Roger Ineichen

> -- 
> Benji York
> Senior Software Engineer
> Zope Corporation
> 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/ Bugfix:

2005-12-03 Thread Benji York

Roger Ineichen wrote:
> Log message for revision 40515:

Here is what I'd do:


 they are provided in a aseparate section. To see anything useful, we have to
 add an object to the folder first:
 
->>> link = 'http://localhost/@@+/action.html?type_name=zope.app.file.File'

->>> browser.getLink(url=link).click()
+>>> import re
+>>> browser.getLink(re.compile('^File$')).click()
 >>> import cStringIO
 >>> browser.getControl('Data').value = cStringIO.StringIO('content')
 >>> browser.getControl(name='add_input_name').value = 'file.txt'



I'm not really a big fan of using regular expressions in testbrowser,
but they exist and we don't have time to implement something better
(probably XPath) before 3.2 is released.
--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/ Bugfix:

2005-12-03 Thread Benji York

Roger Ineichen wrote:

Log message for revision 40515:
  Bugfix:
  Using getLink('File') will end in a testing failure in our application
  because we use a content type '- File' which produce a link called '- File'.
  Use the more concrete url attribute instead of the text attribute in 
  the getLink method will avoid this. 
  
  See also collector issue at:
  http://www.zope.org/Collectors/Zope3-dev/503 



Modified: Zope3/trunk/src/zope/app/apidoc/codemodule/browser/introspector.txt
===
--- Zope3/trunk/src/zope/app/apidoc/codemodule/browser/introspector.txt 
2005-12-03 04:34:49 UTC (rev 40514)
+++ Zope3/trunk/src/zope/app/apidoc/codemodule/browser/introspector.txt 
2005-12-03 12:32:48 UTC (rev 40515)
@@ -134,7 +134,8 @@
 they are provided in a aseparate section. To see anything useful, we have to
 add an object to the folder first:
 
->>> browser.getLink('File').click()

+>>> link = 'http://localhost/@@+/action.html?type_name=zope.app.file.File'
+>>> browser.getLink(url=link).click()
 >>> import cStringIO
 >>> browser.getControl('Data').value = cStringIO.StringIO('content')
 >>> browser.getControl(name='add_input_name').value = 'file.txt'


This isn't really in the "spirit" of testbrowser.  Previously the test 
would ensure that the desired link appeared on the page, was named 
correctly (if a bit too generically), and that it went to the 
appropriate place.  The new version just makes sure the hard-coded URL 
points to the correct page.


I prefer some variation on the previous style (with appropriate 
correction so it isn't so brittle).  Comments/ideas?

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com